//
Error is:-Main method not found in class abc
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.
//
Error is:-Main method not found in class abc
Welcome to the Forum! Thank you for taking the time to learn how to post code correctly. Please read this topic to see other useful info for newcomers.
Please post your error(s) and ask specific questions. It's important to know that we're talking about and working to correct the same errors.
What are the errors get when you run the program
--- Update ---
Look at your main class.. And what your program doing.
Tjones787
Error is:-Main method not found in class abc.
My program is to enter the value of array during runtime.
Many/most programs have a main() method. Look at some other programs and see what is different about your main() method.
If you don't understand my answer, don't ignore it, ask a question.
Yeah. Cause you have a problem with your main method. Check your main method and see where you are wrong. The argument passed to your main method.
Tjones787
but this is the syntax for java.
--- Update ---
pls tell me the complete program.
Check how other java programs main method looks like, then you get what's wrong with yours
Tjones787
Can you explain what your problem is now?i am able to run the program with this
Please edit your post and wrap your code with code tags:
[code=java]
YOUR CODE HERE
[/code]
to get highlighting and preserve formatting.
One possible problem I see is that the for loop control value is hardcoded as 10.
It should use the .length attribute of the ar array.
If you don't understand my answer, don't ignore it, ask a question.
Please check if multi dimensional array can be used as argument.
Thanks and regards,
Sambit Swain