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.

Re: Can you help me?

Please explain the problems are you are having. Copy and paste here the program's output and explain what is wrong with it.

You need to edit the post and properly format the code by adding indentations for nested statements. Unformated code is hard to read and understand. There are too many statements starting in the first column.

Re: Can you help me?

my problem to that code is the looping (sorry to my grammar)
i want to do to that code is if the name is founded the program will stop, and if the name is not found the program will looping again to the question "enter the name you want to search or find until they found. can you try that codes in your JCREATOR?

--- Update ---

Originally Posted by Norm

Please explain the problems are you are having. Copy and paste here the program's output and explain what is wrong with it.

You need to edit the post and properly format the code by adding indentations for nested statements. Unformated code is hard to read and understand. There are too many statements starting in the first column.

Re: Can you help me?

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:695)
at ivan3.main(ivan3.java:101)

The code tries to get the first character (index=0) of a String at line 101 that is empty.
Check the code at line 101 to see why it is trying to look at characters in an empty String.
It could use the String class's length() method to see if the String is empty.

You need to edit the post and properly format the code by adding indentations for nested statements. Unformated code is hard to read and understand. There are too many statements starting in the first column.