Is there any error in the following code? It shows cant find symbol, symbol: class out location: class System. In the log, it show a lot of errors, including
java.lang.
The following code
System.out.println("Enter the value of r"); int r=sc.nextInt(); System.out.println("enter the value h"); int h=sc.nextInt();
must be inside a method. Not directly in the class. Classes can contain field and method declarations, but not arbitrary code.