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

25th Sep 2017, 5:12 PM
Usama Zafar
Usama Zafar - avatar
2 odpowiedzi
+ 1
The code you posted works fine with no error.
25th Sep 2017, 5:19 PM
ChaoticDawg
ChaoticDawg - avatar
0
It's still giving me error.Thats the confusing part.I have an unused class too so is that the problem?
25th Sep 2017, 5:19 PM
Usama Zafar
Usama Zafar - avatar