| String split doesnt work [message #989862] |
Sat, 08 December 2012 12:39  |
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  |
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 );
|
|
|
Powered by
FUDForum. Page generated in 0.01559 seconds