Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » String split doesnt work
String split doesnt work [message #989862] Sat, 08 December 2012 12:39 Go to next message
Martin Pültz is currently offline Martin Pültz
Messages: 1
Registered: December 2012
Junior Member
Hello everybody,

i really do have a strange problem with a string in java that i would likly to split in two parts, but it doesnt work at all ...


in the console, the string appears as the following (with system.out.println):

org.esdihumboldt.eu.wdcs.impl.WorkflowImpl@a6a86fe (name: file:/C:/Users/Martin/default3.wdcs)


i would liky to split up the string in two parts at the blank line. no problem at all with the general method split. so i did:

String[] zeichenkette = w.toString().split("");

but see the results, when i print that (with system.out.println):

[Ljava.lang.String;@1c2a5b50


how can that be? can anybody out there help me please? i dont relly know, what to do ...


I would be very thankful for any answer!
Re: String split doesnt work [message #989895 is a reply to message #989862] Sun, 09 December 2012 11:41 Go to previous message
Russell Bateman is currently offline Russell Bateman
Messages: 2701
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 12/09/2012 09:10 AM, Martin Pültz wrote:
> Hello everybody,
>
> i really do have a strange problem with a string in java that i would
> likly to split in two parts, but it doesnt work at all ...
>
>
> in the console, the string appears as the following (with
> system.out.println):
>
> mailto:org.esdihumboldt.eu.wdcs.impl.WorkflowImpl@a6a86fe (name:
> file:/C:/Users/Martin/default3.wdcs)
>
>
> i would liky to split up the string in two parts at the blank line. no
> problem at all with the general method split. so i did:
>
> String[] zeichenkette = w.toString().split("");
>
> but see the results, when i print that (with system.out.println):
>
> [Ljava.lang.String;@1c2a5b50
>
>
> how can that be? can anybody out there help me please? i dont relly
> know, what to do ...
>
>
> I would be very thankful for any answer!

This isn't an Eclipse, but a simple Java question which should be asked
in a Java forum like javaranch.com, jguru.com or even stackoverflow.com.

To see what's in your String array, do this:

for( String string : zeichenkette )
System.out.println( string );
Previous Topic:Change in font size affecting hotkeys?
Next Topic:C++ Project with Web Server Interface
Goto Forum:
  


Current Time: Mon May 20 00:58:00 EDT 2013

Powered by FUDForum. Page generated in 0.01559 seconds