When I run my code, I receive this error message:
Error: Main method not found in class "Class name", please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
My code:
public static void main(String[] args){
public void printPhoto(int width,int height, boolean inColor){
System.out.println("Width = " + width + " cm" );
System.out.println("Height = " + height + " cm");
if(inColor){
System.out.println("Print is Full color.");
} else {
System.out.println("Print is black and white.");
}
printPhoto(10,20,false);
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…