I need to complete this project by next Monday.
How do I do a menu selection
EXAMPLE:
Press 1 to enter the model number.
Press 2 to delete a record.
Press 3 to exit the program.
I'm doing this project on NetBean using Java.
Can someone please teach me?
Thanks!!!!
fairy1992224 0 Newbie Poster
Recommended Answers
Jump to PostOk. What kind of menu selection are you using? You can use the below code
import java.io.*; public test{ public static void main(String args[]) throws IOException { BufferedReader bfr= new BufferedReader(new InputStreamReader(System.in)); System.out.println("MENU"); System.out.println("enter a number"); int n=Integer.parseInt(bfr.readLine()); if(n==1) { //condition System.out.println("number is one"); } else if(n==2) …
Jump to PostNo. Actually you don't need to. You can use the lines between public main class that is from buffered reader and use it in your class. If you need any help you can reply me to my mail. SNIP
Jump to Post@fairy1992224 rule of the forum We only give homework help to those who show effort
and for the rest, you should reconsider it how much help is good with given interest from original poster. You maybe helping another lazy programmer after whom you could be fixing errors in …
All 10 Replies
inspectorG4dget 0 Newbie Poster
fairy1992224 0 Newbie Poster
roxin_phoenix 0 Newbie Poster
fairy1992224 0 Newbie Poster
ajijacobm 0 Light Poster
fairy1992224 0 Newbie Poster
ajijacobm 0 Light Poster
ajijacobm 0 Light Poster
Akill10 96 Posting Pro
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.