Also It is good if you use this format for class name and accessibility:
- Code: Select all
class MyClass
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
}
}
Instead of making your class public and using Main as class name. This will help you avoid compile error.