Results 1 to 2 of 2
  1. #1
    javanew is offline Member
    Join Date
    Mar 2010
    Posts
    49
    Rep Power
    0

    Question String regioMatches help

    System.out.println("x123455".regionMatches(0,"x1", 3,2));

    //-?? how to make it return TRUE !!!!!!!!!!!!
    it keeps returning false !!

    anybody can help me ,, to explain thsi

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,001
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by javanew View Post
    System.out.println("x123455".regionMatches(0,"x1", 3,2));

    //-?? how to make it return TRUE !!!!!!!!!!!!
    it keeps returning false !!

    anybody can help me ,, to explain thsi
    I think it should be '"x123455".regionMatches(0,"x1",0,2)'. Read the API documentation for that method.

    kind regards,

    Jos

Similar Threads

  1. Replies: 7
    Last Post: 11-03-2009, 02:18 AM
  2. combine string[] into string like perl's join function
    By tekberg in forum Advanced Java
    Replies: 9
    Last Post: 02-23-2009, 01:05 PM
  3. Replies: 5
    Last Post: 01-11-2009, 10:12 AM
  4. Replies: 0
    Last Post: 11-20-2007, 04:59 PM
  5. Replies: 1
    Last Post: 08-03-2007, 10:52 AM

Posting Permissions

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