Results 1 to 2 of 2
  1. #1
    ganeshmore is offline Member
    Join Date
    Jun 2012
    Posts
    1
    Rep Power
    0

    Default Find Special String length in jdk1.6 on Unix

    When i run this code in jdk1.6 on unix then length of string is 2994 & 2999 but actually length of both string is 3000 Pls tell me the solution


    import java.util.ArrayList;


    public class TestLength {

    /**
    * @param args
    */
    public static void main(String[] args) {
    // TODO Auto-generated method stub

    ArrayList alList = new ArrayList();
    alList.add("D0000001KRHSBC000000000006 KRHSBC002083095 KR KR KRWSVR 1 0203 NN 5 AAAAAAA AAAAA AAAAAAA AAAAA AAAAAAAAAAAAA A/E~E~~/(*) AAAAAAAAAAAAA A/E~E~~/(*) AAAAAAAAAAAAAAAAAAA ATTN:7ߵviAl AAAAAAAAAAAAAAAAAAAAAAA ԟi~ hʻa jvJn 90 AAAAA AAAAA maxzpߡ5C 135-010 135-010 135-010 100 KIM DONG BIN H3000000000000000.000+ ");
    alList.add("D0000001KRHSBC000000000008 KRHSBC002085900 KR KR USDSVR 1 0200 NN 5 AAAA AAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA AAAAAAAAAAA AAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAA ԟi~ pa Ha~2h/310 AAAAAAAAAAAAAAAAAAAAAAAA Ha~xzp25C AAAAA 100-767 100-767 100-767 100-767 13 KIM SUNG WOOK H ");
    //java.net.URLDecoder.decode(alList[0],"UTF-8");
    //System.out.println(alList.size());
    System.out.println(((String) alList.get(0)).length());
    //System.out.println(((String) alList.get(1)).length());
    }

    }

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,172
    Rep Power
    20

    Default Re: Find Special String length in jdk1.6 on Unix

    No it's not.
    The first one is 394 characters long.
    Neither of those are 3000 characters long.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 3
    Last Post: 01-12-2012, 11:33 AM
  2. Replies: 11
    Last Post: 08-15-2011, 11:12 AM
  3. Replies: 2
    Last Post: 02-09-2011, 05:12 PM
  4. Replies: 2
    Last Post: 10-22-2010, 08:54 PM
  5. JNLP - Swing application compiled in jdk1.5 not working in jdk1.6
    By mahendra.athneria in forum AWT / Swing
    Replies: 4
    Last Post: 01-20-2009, 09:27 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
  •