can I use scanner as class field?
"can I use Scanner as class field?" I used this line for google and found some results, the reason I ask is someone told me I shouldn't but being as persistent as I am I didn't take it for granted.
COMP101 - CONSTRAINED AND UNCONSTRAINED ARRAYS
was one example of using Scanner as field.
public class appleTest
private Scanner dummy = new Scanner(System.in);
private Scanner input = new Scanner(System.in);
private boolean loggedIn=false;
System.out.print("Enter something: ");
junk = dummy.nextLine();