Important alert: (current site time 7/15/2013 3:33:48 PM EDT)
 

VB icon

lame menu

Email
Submitted on: 10/21/2003 7:22:40 PM
By: paul stenius  
Level: Beginner
User Rating: Unrated
Compatibility: Java (JDK 1.2)
Views: 4982
(About the author)
 
     a menu that is lame, not an applet
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
//**************************************
// Name: lame menu
// Description:a menu that is lame, not an applet
// By: paul stenius
//
//This code is copyrighted and has// limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=3931&lngWId=2//for details.//**************************************

import java.io.*;
import java.text.DecimalFormat;
	public class menu 
	{ 
	public static void main(String[] args) throws IOException 
		{ 
		BufferedReader stdin = new BufferedReader (new InputStreamReader( System.in ) );
		//make the varables 
		String temp;
		int choice; 
			//get users data
			System.out.println("(0) Blah");
			System.out.println("(1) Another Blah");
			System.out.println("(2) Third Blah");
			System.out.println("(3) Sixth blah");
			System.out.println("(4) option"); 
			System.out.println("(5) Blah option");
			System.out.println("(6) Blah");
			System.out.println("(7) Repeated");
			System.out.println("(8) once");
			System.out.println("(9) again");
			System.out.println("Enter your choice now:");
			
			temp = stdin.readLine();
			choice = Integer.parseInt( temp );
			
					if ( choice == 0 ) 
						System.out.println("choice one");
						 
					else 
					if ( choice == 1 ) 
						System.out.println("choice two"); 
						
					else 
					if ( choice == 2 )
						System.out.println("choice three");
					else 
					if ( choice == 3 ) 
						System.out.println("choice four");
					else 
					if ( choice == 4 )
						System.out.println("choice five");
					else 
					if ( choice == 5 ) 
						System.out.println("choice six");
					else 
					if ( choice == 6 ) 
						System.out.println("choice seven");
					else 
					if ( choice == 7 ) 
						System.out.println("choice eight");
					
					else
					if ( choice == 8 )
						System.out.println("choice nine");
					else 
					if ( choice == 9 ) 
						System.out.println("choice ten");
					else 
					System.out.println("YOUR WRONG!"); 
		} 
	}


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
11/10/2003 5:36:48 PM

this code is not lame, in fact i learnt
from it. the others javascript and applet codes, i couldn't understand.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.