0
Cannot be resolved
import java.util.Scanner; class apples{ public static void main (String args []) { Scanner scannerObject=new Scanner(System.in); System.out.println ("Enter name:"); String tempName=scannerObject.nextLine (); System.out.println ("Name is : " +tempName); } } EEROR:scannerObject cannot be resolved I know this is basic but I need help + correction. Would be really thankful
2 Answers
+ 1
The code you posted works fine with no error.
0
It's still giving me error.Thats the confusing part.I have an unused class too so is that the problem?