it throws me error incompatible types: unexpected return value — return 10; please correct it make note where i am doing wrong code?

void means the method cannot return any value. if you wish to quit the application with exit code you can use System.exit().

   public static void main(String[] args) {

refer Can a main method in Java return something?

Leave a Comment