Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: java validate help??

  1. #1
    Junior Member
    Join Date
    Apr 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default java validate help??

    I have a text file that contain the following data
    john;j1;j125;road;12345
    mary;ma1,mm111,ave;45654
    .
    .
    .
    so i need to key in input 1 and 2 to match and matches that data then display the remaining data
    example:
    input1: j1
    input2: j125

    john
    road
    12345
    so how am i suppose to do it, i'm very new to this java programming


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: java validate help??

    Hello zyspt,

    Welcome to the Java Programming Forums.

    You should look into the Scaner class for reading in the file:

    http://www.javaprogrammingforums.com...ner-class.html

    You can also use the Scanner class to take user input at the console:

    http://www.javaprogrammingforums.com...ner-class.html

    Maybe take a look into the split method and use ; as a delimiter.

    See what you can come up with and post back when you are stuck.. I will do my best to help you.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. Replies: 3
    Last Post: December 22nd, 2011, 09:46 AM
  2. Validate in server side..
    By Ganezan in forum What's Wrong With My Code?
    Replies: 4
    Last Post: October 27th, 2009, 06:36 AM
  3. Replies: 1
    Last Post: July 28th, 2009, 02:15 AM