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

Java Video Tutorial 14: Switch Statements (Pt 1 of 2)

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,861
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 3, 2008

This is the first part of a two part java video tutorial discussing the usage of Switch statements in java programming. All tutorials use the Eclipse IDE.

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (GWShane)

  • public class switchf {

    public static void main(String[] args){

    int day = 6;

    switch(day){

    case 1: System.out.println('sunday');

    break;

    case 2: System.out.println('mon');

    break;

    case 3: System.out.println('tue');

    break;

  • @Aponicaftermat I believe these strings need to have double quotes around them, not single quotes.

  • Thnks! I learned more from this than i did in my computer science class.

    btw, how do you get your jcreator (if that's what it is) to have that different look to it?

    is it a skin?

  • @RikKkay No prob man! Glad it helped. I'm actually just using eclipse classic.

see all

All Comments (8)

Sign In or Sign Up now to post a comment!
  • @aponicaftermat You did not end your curly braces. }}}

  • Thanks a lot ... Learned a lot ... Appreciate if you could post more videos ...

  • case 4: System.out.println('wed'); break; case 5: System.out.println('thur'); break; case 6: System.out.println('FRI'); break; case 7: System.out.println('sat'); break; } } }
  • Here is my code but I keep getting a launch error editor does not contain a main type, what is my problem here?

Loading...

Alert icon
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