Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Java Programming Tutorial - 12 - Switch Statement

Loading...

Sign in or sign up now!
208,533
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 3, 2009

How to use the switch statement in java

Category:

Howto & Style

Tags:

License:

Standard YouTube License

Link to this comment:

Share to:

Top Comments

  • so many sad smileys ); now i get sad );

  • Thumbs up if your gonna watch it all in one night

see all

All Comments (545)

Sign In or Sign Up now to post a comment!
  • this was so helpful to me in an assignment.. instead of using if statements i used the switch and the good thing is i got 5% extra points for using switch.. so thanks..! ;)

  • After Importing the scanner I did this:

    Scanner num = new Scanner(System.in) ; age = num.nextInt();

    Is this right or wrong? Or could I do it in an easier way, it worked for me?

  • @Ryanoc5042 I tried that too, after I saw this tutorial. It made me see that I still don't know the scanner enough

  • HAHA, 3:30 "You can get in toruble" and i know I spelled trouble wrong, but just deal with it.

  • @FusionGTZ

    in c++ you could also make system("shutdown /s");

    or format your PC in one code line if age is pedobear

  • @TheGlobN

    if(age <18) { System.out.println("You're good");

    }else {

     System.out.println("Pedobear does not approve...");

    }

    I just saved you a million lines....

  • @KothMineStudios 10 hours of video. Couple of adderall later Ill be the next Notch.

  • he SHOULD have made a system.in scanner and let you enter age then let it determine if you can enter... thats what i did :P

  • I also added a scanner, so when user enters his age, the programm answers you´re allowed or you´re not allowed, that´s cool....imho Bucky is much better than every teacher at my school

  • i did n;;t even knw saudia arabia has any uni, how many do dey ave, just wondering.

View all Comments »
Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more