+ 1
Omerg Your file name and class name (with main method) should be same.
18th Mar 2022, 11:20 PM
AĶ¢J
AĶ¢J - avatar
0
It working fine... check again.
18th Mar 2022, 4:56 PM
Jayakrishna šŸ‡®šŸ‡³
0
Where are you trying that? name file as MyClass.java Compile first by javac MyClass.java Then run by java MyClass //if you name other, use same name in compiling but must use main method name while running.. javac jv.java java MyClass
18th Mar 2022, 5:10 PM
Jayakrishna šŸ‡®šŸ‡³
0
In general, in java file name must be the same as class name where main() method exist.
18th Mar 2022, 9:35 PM
Sneha Singh