I am getting the following error :
can\'t find main(String[]) method in class
impor
Java is looking for the main
method in the classname.java
file you want to compile. The name of the file has to correspond with the class found in it.
My suggestion is, that your file is not named TcsDigital.java
, therefore java is taking the first java class it finds, which is Coor
. Since Coor
does not contain a main
method an error occurs.
You should try renaming your file to TcsDigital.java
.
I recommend to write every java class in a sepreate file and to import them as needed. An additional Main class containing only the main
method is an option, too.