I m not able to find the problem so as the solution .need help stuck from 2days.
still there is problem
2
Please remove semicolon after method name
the problem here is you put ; in the main function. and some minor changes to be fix.
;
to solve this here how look it is:
import java.util.Scanner; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int age = sc.nextInt(); if (age > 18) { System.out.println("Adult"); } else { System.out.println("Not Adult"); } }
best practice when you creating a file class it should be a PascalCase and followed by your class name also as PascalCase.
Click here to cancel reply.
2
Answers
Please remove semicolon after method name
the problem here is you put
;
in the main function. and some minor changes to be fix.to solve this here how look it is:
best practice when you creating a file class it should be a PascalCase and followed by your class name also as PascalCase.