Using a switch statement in conjunction with a scanner .

0 shaun hester · February 19, 2015
so i was trying to make it to where the computer asks age and based on the interger the switch statement would spit back a response ..not sure im grasping the concept though as it keeps telling me the scanner cant pick up the int . here is what i have
package jack;
import java.util.Scanner;
public class dog {
public static void main(String args[]){
int a;
Scanner age = new scanner(;
age= (a);
case a18:


Post a Reply


Oldest  Newest  Rating
0 shaun hester · February 19, 2015
its like a puzzle stare at it long enough and you get stumped take a second look again and things show up ..still not sure about the scanner int thing
0 shaun hester · February 19, 2015
i see i forgot the initial question as well
  • 1

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator