Results 1 to 2 of 2
  1. #1
    glenwood is offline Member
    Join Date
    Sep 2008
    Posts
    2
    Rep Power
    0

    Default How To Use Split In Java

    I am having the following data "a|||||" if I split this data with pipe symbol I am getting length as 1 ...why?

    String s = "a|||||";
    String[] s1 = s.split("\\|");
    s1.length is giving 1...
    please help in it..
    its very urgent for my work....please do help in it.
    thanks in advance.

  2. #2
    glenwood is offline Member
    Join Date
    Sep 2008
    Posts
    2
    Rep Power
    0

Similar Threads

  1. How to split a String using split function
    By Java Tip in forum java.lang
    Replies: 4
    Last Post: 04-17-2009, 09:27 PM
  2. problem with split method
    By abhiN in forum New To Java
    Replies: 7
    Last Post: 02-10-2009, 02:54 PM
  3. split Keyword
    By santhoshrao in forum New To Java
    Replies: 4
    Last Post: 08-13-2008, 11:28 AM
  4. how to split a file
    By nagaraaju in forum New To Java
    Replies: 0
    Last Post: 03-14-2008, 09:45 AM
  5. How to split a String using split function
    By JavaBean in forum Java Tip
    Replies: 0
    Last Post: 10-04-2007, 10:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •