SlideShare una empresa de Scribd logo
1 de 1
Descargar para leer sin conexión
(I'm trying to make a menu that repeats unless you enter 4. How do I get this to repeat the
printMenu()Method that prints the options and keeps repeating options until you hit exit #4?)
public class Main { public static void main(String[] args) { Scanner input = new
Scanner(System.in); printMenu(); int x = input.nextInt(); if ( x == 1) countPunctuation(); if ( x
== 2) charactertoBinary(); if ( x == 3) binaryToCharacter(); if (x == 4) System.out.print("You
have chosen Exit. Goodbye"); if (x > 4) System.out.print("Error"); printMenu(); if (x < 1)
System.out.print("Error"); } // Create first Method. Print Menu*** public static void
printMenu(){ String newline = System.getProperty("line.separator"); System.out.print("Enter '1'
to count punctuation symbols in a String." + newline + "Enter '2' to convert characters to binary."
+ newline + "Enter '3' to convert 8-bit binary to a character." + newline + "Enter '4' to
exit."+newline +"Enter option:"); }

Más contenido relacionado

Similar a (I'm trying to make a menu that repeats unless you enter 4- How do I g.pdf

KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerAiman Hud
 
Trace the following part of codes step by step- Show exactly what it w.docx
Trace the following part of codes step by step- Show exactly what it w.docxTrace the following part of codes step by step- Show exactly what it w.docx
Trace the following part of codes step by step- Show exactly what it w.docxgtameka
 
I need to create a data type that implement the following interface -.docx
I need to create a data type that implement the following interface -.docxI need to create a data type that implement the following interface -.docx
I need to create a data type that implement the following interface -.docxmckerliejonelle
 
For the following I have finished most of this question but am havin.pdf
For the following I have finished most of this question but am havin.pdfFor the following I have finished most of this question but am havin.pdf
For the following I have finished most of this question but am havin.pdfarihantplastictanksh
 
Here is the code for youimport java.util.Scanner; import java.u.pdf
Here is the code for youimport java.util.Scanner; import java.u.pdfHere is the code for youimport java.util.Scanner; import java.u.pdf
Here is the code for youimport java.util.Scanner; import java.u.pdfanithareadymade
 
Hello. This program has to be done in Eclipse(Program used to write .pdf
Hello. This program has to be done in Eclipse(Program used to write .pdfHello. This program has to be done in Eclipse(Program used to write .pdf
Hello. This program has to be done in Eclipse(Program used to write .pdfarchiesgallery
 
Modify before asshignment so that we can check input errors, etc.. P.pdf
Modify before asshignment so that we can check input errors, etc.. P.pdfModify before asshignment so that we can check input errors, etc.. P.pdf
Modify before asshignment so that we can check input errors, etc.. P.pdfarihantplastictanksh
 
import java.util.Scanner;public class ArrayOperation {    inp.pdf
import java.util.Scanner;public class ArrayOperation {     inp.pdfimport java.util.Scanner;public class ArrayOperation {     inp.pdf
import java.util.Scanner;public class ArrayOperation {    inp.pdfangelsfashion1
 
Im getting List Full when I try to add 2nd student.Driver..pdf
Im getting List Full when I try to add 2nd student.Driver..pdfIm getting List Full when I try to add 2nd student.Driver..pdf
Im getting List Full when I try to add 2nd student.Driver..pdfforwardcom41
 
import java.util.Scanner;public class HornersPolynomial {   .pdf
import java.util.Scanner;public class HornersPolynomial {   .pdfimport java.util.Scanner;public class HornersPolynomial {   .pdf
import java.util.Scanner;public class HornersPolynomial {   .pdfaptex1
 
Sharable_Java_Python.pdf
Sharable_Java_Python.pdfSharable_Java_Python.pdf
Sharable_Java_Python.pdfICADCMLTPC
 
ch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptMahyuddin8
 
Lab01.pptx
Lab01.pptxLab01.pptx
Lab01.pptxKimVeeL
 
Form1.csusing System; using System.Collections.Generic; using .pdf
Form1.csusing System; using System.Collections.Generic; using .pdfForm1.csusing System; using System.Collections.Generic; using .pdf
Form1.csusing System; using System.Collections.Generic; using .pdfapleather
 
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdf
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdfJava Program- Wrtie a Fraction classGiven the main method of a dri.pdf
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdfarchanaemporium
 
Star pattern programs in java Print Star pattern in java and print triangle ...
Star pattern programs in java Print Star pattern in java and  print triangle ...Star pattern programs in java Print Star pattern in java and  print triangle ...
Star pattern programs in java Print Star pattern in java and print triangle ...Hiraniahmad
 

Similar a (I'm trying to make a menu that repeats unless you enter 4- How do I g.pdf (20)

Java file
Java fileJava file
Java file
 
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
 
Trace the following part of codes step by step- Show exactly what it w.docx
Trace the following part of codes step by step- Show exactly what it w.docxTrace the following part of codes step by step- Show exactly what it w.docx
Trace the following part of codes step by step- Show exactly what it w.docx
 
I need to create a data type that implement the following interface -.docx
I need to create a data type that implement the following interface -.docxI need to create a data type that implement the following interface -.docx
I need to create a data type that implement the following interface -.docx
 
09. Java Methods
09. Java Methods09. Java Methods
09. Java Methods
 
For the following I have finished most of this question but am havin.pdf
For the following I have finished most of this question but am havin.pdfFor the following I have finished most of this question but am havin.pdf
For the following I have finished most of this question but am havin.pdf
 
Here is the code for youimport java.util.Scanner; import java.u.pdf
Here is the code for youimport java.util.Scanner; import java.u.pdfHere is the code for youimport java.util.Scanner; import java.u.pdf
Here is the code for youimport java.util.Scanner; import java.u.pdf
 
Hello. This program has to be done in Eclipse(Program used to write .pdf
Hello. This program has to be done in Eclipse(Program used to write .pdfHello. This program has to be done in Eclipse(Program used to write .pdf
Hello. This program has to be done in Eclipse(Program used to write .pdf
 
10. Recursion
10. Recursion10. Recursion
10. Recursion
 
Modify before asshignment so that we can check input errors, etc.. P.pdf
Modify before asshignment so that we can check input errors, etc.. P.pdfModify before asshignment so that we can check input errors, etc.. P.pdf
Modify before asshignment so that we can check input errors, etc.. P.pdf
 
import java.util.Scanner;public class ArrayOperation {    inp.pdf
import java.util.Scanner;public class ArrayOperation {     inp.pdfimport java.util.Scanner;public class ArrayOperation {     inp.pdf
import java.util.Scanner;public class ArrayOperation {    inp.pdf
 
Im getting List Full when I try to add 2nd student.Driver..pdf
Im getting List Full when I try to add 2nd student.Driver..pdfIm getting List Full when I try to add 2nd student.Driver..pdf
Im getting List Full when I try to add 2nd student.Driver..pdf
 
import java.util.Scanner;public class HornersPolynomial {   .pdf
import java.util.Scanner;public class HornersPolynomial {   .pdfimport java.util.Scanner;public class HornersPolynomial {   .pdf
import java.util.Scanner;public class HornersPolynomial {   .pdf
 
Sharable_Java_Python.pdf
Sharable_Java_Python.pdfSharable_Java_Python.pdf
Sharable_Java_Python.pdf
 
ch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.ppt
 
Lab01.pptx
Lab01.pptxLab01.pptx
Lab01.pptx
 
Form1.csusing System; using System.Collections.Generic; using .pdf
Form1.csusing System; using System.Collections.Generic; using .pdfForm1.csusing System; using System.Collections.Generic; using .pdf
Form1.csusing System; using System.Collections.Generic; using .pdf
 
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdf
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdfJava Program- Wrtie a Fraction classGiven the main method of a dri.pdf
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdf
 
Star pattern programs in java Print Star pattern in java and print triangle ...
Star pattern programs in java Print Star pattern in java and  print triangle ...Star pattern programs in java Print Star pattern in java and  print triangle ...
Star pattern programs in java Print Star pattern in java and print triangle ...
 
Methods intro-1.0
Methods intro-1.0Methods intro-1.0
Methods intro-1.0
 

Más de aone2010

(TRUE or FALSE-) When interest expense is subtracted from EBIT- the re.pdf
(TRUE or FALSE-) When interest expense is subtracted from EBIT- the re.pdf(TRUE or FALSE-) When interest expense is subtracted from EBIT- the re.pdf
(TRUE or FALSE-) When interest expense is subtracted from EBIT- the re.pdfaone2010
 
(TRUE or FALSE-) Secondary markets are markets for securities that wer.pdf
(TRUE or FALSE-) Secondary markets are markets for securities that wer.pdf(TRUE or FALSE-) Secondary markets are markets for securities that wer.pdf
(TRUE or FALSE-) Secondary markets are markets for securities that wer.pdfaone2010
 
(TRUE or FALSE-) Most securities sales on the New York Stock Exchange.pdf
(TRUE or FALSE-) Most securities sales on the New York Stock Exchange.pdf(TRUE or FALSE-) Most securities sales on the New York Stock Exchange.pdf
(TRUE or FALSE-) Most securities sales on the New York Stock Exchange.pdfaone2010
 
(Trypanosomiasis)1- How to prevent the spread of the microorganisms (.pdf
(Trypanosomiasis)1- How to prevent the spread of the microorganisms (.pdf(Trypanosomiasis)1- How to prevent the spread of the microorganisms (.pdf
(Trypanosomiasis)1- How to prevent the spread of the microorganisms (.pdfaone2010
 
(TRUE or FALSE-) Current assets are the assets that the firm uses to g.pdf
(TRUE or FALSE-) Current assets are the assets that the firm uses to g.pdf(TRUE or FALSE-) Current assets are the assets that the firm uses to g.pdf
(TRUE or FALSE-) Current assets are the assets that the firm uses to g.pdfaone2010
 
(Three types of business organizations) Which of the following stateme.pdf
(Three types of business organizations) Which of the following stateme.pdf(Three types of business organizations) Which of the following stateme.pdf
(Three types of business organizations) Which of the following stateme.pdfaone2010
 
(TF) According to the Central Limit Theorem- if x is normally distribu.pdf
(TF) According to the Central Limit Theorem- if x is normally distribu.pdf(TF) According to the Central Limit Theorem- if x is normally distribu.pdf
(TF) According to the Central Limit Theorem- if x is normally distribu.pdfaone2010
 
(Table) According to the table- the GDP deflator for 2012 is approxima.pdf
(Table) According to the table- the GDP deflator for 2012 is approxima.pdf(Table) According to the table- the GDP deflator for 2012 is approxima.pdf
(Table) According to the table- the GDP deflator for 2012 is approxima.pdfaone2010
 
(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf
(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf
(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdfaone2010
 
(Hint- use induction on the sequence of operations- check the proof of.pdf
(Hint- use induction on the sequence of operations- check the proof of.pdf(Hint- use induction on the sequence of operations- check the proof of.pdf
(Hint- use induction on the sequence of operations- check the proof of.pdfaone2010
 
(Explain)(1) cconomic equality is one of the most important characteri.pdf
(Explain)(1) cconomic equality is one of the most important characteri.pdf(Explain)(1) cconomic equality is one of the most important characteri.pdf
(Explain)(1) cconomic equality is one of the most important characteri.pdfaone2010
 
(Fill in the blank) Patterns are the behavior- derived from the relati.pdf
(Fill in the blank) Patterns are the behavior- derived from the relati.pdf(Fill in the blank) Patterns are the behavior- derived from the relati.pdf
(Fill in the blank) Patterns are the behavior- derived from the relati.pdfaone2010
 
(e) P(0-76z0-54) (f) P(z-3).pdf
(e) P(0-76z0-54) (f) P(z-3).pdf(e) P(0-76z0-54) (f) P(z-3).pdf
(e) P(0-76z0-54) (f) P(z-3).pdfaone2010
 
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdfaone2010
 
(C++) Write a car rental application- Things that you need to impleme.pdf
(C++) Write a car rental application-  Things that you need to impleme.pdf(C++) Write a car rental application-  Things that you need to impleme.pdf
(C++) Write a car rental application- Things that you need to impleme.pdfaone2010
 
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdfaone2010
 
(d) Click the icon to view the data table (Type an integer or a decima.pdf
(d) Click the icon to view the data table (Type an integer or a decima.pdf(d) Click the icon to view the data table (Type an integer or a decima.pdf
(d) Click the icon to view the data table (Type an integer or a decima.pdfaone2010
 
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdfaone2010
 
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdfaone2010
 
(PE12-7) Create a Windows application that has the functionality of.pdf
(PE12-7) Create a Windows application that has    the functionality of.pdf(PE12-7) Create a Windows application that has    the functionality of.pdf
(PE12-7) Create a Windows application that has the functionality of.pdfaone2010
 

Más de aone2010 (20)

(TRUE or FALSE-) When interest expense is subtracted from EBIT- the re.pdf
(TRUE or FALSE-) When interest expense is subtracted from EBIT- the re.pdf(TRUE or FALSE-) When interest expense is subtracted from EBIT- the re.pdf
(TRUE or FALSE-) When interest expense is subtracted from EBIT- the re.pdf
 
(TRUE or FALSE-) Secondary markets are markets for securities that wer.pdf
(TRUE or FALSE-) Secondary markets are markets for securities that wer.pdf(TRUE or FALSE-) Secondary markets are markets for securities that wer.pdf
(TRUE or FALSE-) Secondary markets are markets for securities that wer.pdf
 
(TRUE or FALSE-) Most securities sales on the New York Stock Exchange.pdf
(TRUE or FALSE-) Most securities sales on the New York Stock Exchange.pdf(TRUE or FALSE-) Most securities sales on the New York Stock Exchange.pdf
(TRUE or FALSE-) Most securities sales on the New York Stock Exchange.pdf
 
(Trypanosomiasis)1- How to prevent the spread of the microorganisms (.pdf
(Trypanosomiasis)1- How to prevent the spread of the microorganisms (.pdf(Trypanosomiasis)1- How to prevent the spread of the microorganisms (.pdf
(Trypanosomiasis)1- How to prevent the spread of the microorganisms (.pdf
 
(TRUE or FALSE-) Current assets are the assets that the firm uses to g.pdf
(TRUE or FALSE-) Current assets are the assets that the firm uses to g.pdf(TRUE or FALSE-) Current assets are the assets that the firm uses to g.pdf
(TRUE or FALSE-) Current assets are the assets that the firm uses to g.pdf
 
(Three types of business organizations) Which of the following stateme.pdf
(Three types of business organizations) Which of the following stateme.pdf(Three types of business organizations) Which of the following stateme.pdf
(Three types of business organizations) Which of the following stateme.pdf
 
(TF) According to the Central Limit Theorem- if x is normally distribu.pdf
(TF) According to the Central Limit Theorem- if x is normally distribu.pdf(TF) According to the Central Limit Theorem- if x is normally distribu.pdf
(TF) According to the Central Limit Theorem- if x is normally distribu.pdf
 
(Table) According to the table- the GDP deflator for 2012 is approxima.pdf
(Table) According to the table- the GDP deflator for 2012 is approxima.pdf(Table) According to the table- the GDP deflator for 2012 is approxima.pdf
(Table) According to the table- the GDP deflator for 2012 is approxima.pdf
 
(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf
(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf
(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf
 
(Hint- use induction on the sequence of operations- check the proof of.pdf
(Hint- use induction on the sequence of operations- check the proof of.pdf(Hint- use induction on the sequence of operations- check the proof of.pdf
(Hint- use induction on the sequence of operations- check the proof of.pdf
 
(Explain)(1) cconomic equality is one of the most important characteri.pdf
(Explain)(1) cconomic equality is one of the most important characteri.pdf(Explain)(1) cconomic equality is one of the most important characteri.pdf
(Explain)(1) cconomic equality is one of the most important characteri.pdf
 
(Fill in the blank) Patterns are the behavior- derived from the relati.pdf
(Fill in the blank) Patterns are the behavior- derived from the relati.pdf(Fill in the blank) Patterns are the behavior- derived from the relati.pdf
(Fill in the blank) Patterns are the behavior- derived from the relati.pdf
 
(e) P(0-76z0-54) (f) P(z-3).pdf
(e) P(0-76z0-54) (f) P(z-3).pdf(e) P(0-76z0-54) (f) P(z-3).pdf
(e) P(0-76z0-54) (f) P(z-3).pdf
 
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf
 
(C++) Write a car rental application- Things that you need to impleme.pdf
(C++) Write a car rental application-  Things that you need to impleme.pdf(C++) Write a car rental application-  Things that you need to impleme.pdf
(C++) Write a car rental application- Things that you need to impleme.pdf
 
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf
 
(d) Click the icon to view the data table (Type an integer or a decima.pdf
(d) Click the icon to view the data table (Type an integer or a decima.pdf(d) Click the icon to view the data table (Type an integer or a decima.pdf
(d) Click the icon to view the data table (Type an integer or a decima.pdf
 
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf
 
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf
 
(PE12-7) Create a Windows application that has the functionality of.pdf
(PE12-7) Create a Windows application that has    the functionality of.pdf(PE12-7) Create a Windows application that has    the functionality of.pdf
(PE12-7) Create a Windows application that has the functionality of.pdf
 

Último

Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxryandux83rd
 
Objectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxObjectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxMadhavi Dharankar
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
DBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfDBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfChristalin Nelson
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptxmary850239
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfChristalin Nelson
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineCeline George
 
physiotherapy in Acne condition.....pptx
physiotherapy in Acne condition.....pptxphysiotherapy in Acne condition.....pptx
physiotherapy in Acne condition.....pptxAneriPatwari
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
The Emergence of Legislative Behavior in the Colombian Congress
The Emergence of Legislative Behavior in the Colombian CongressThe Emergence of Legislative Behavior in the Colombian Congress
The Emergence of Legislative Behavior in the Colombian CongressMaria Paula Aroca
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 

Último (20)

Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptx
 
Objectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxObjectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptx
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
CARNAVAL COM MAGIA E EUFORIA _
CARNAVAL COM MAGIA E EUFORIA            _CARNAVAL COM MAGIA E EUFORIA            _
CARNAVAL COM MAGIA E EUFORIA _
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
DBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfDBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdf
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Spearman's correlation,Formula,Advantages,
Spearman's correlation,Formula,Advantages,Spearman's correlation,Formula,Advantages,
Spearman's correlation,Formula,Advantages,
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdf
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command Line
 
Introduction to Research ,Need for research, Need for design of Experiments, ...
Introduction to Research ,Need for research, Need for design of Experiments, ...Introduction to Research ,Need for research, Need for design of Experiments, ...
Introduction to Research ,Need for research, Need for design of Experiments, ...
 
physiotherapy in Acne condition.....pptx
physiotherapy in Acne condition.....pptxphysiotherapy in Acne condition.....pptx
physiotherapy in Acne condition.....pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
The Emergence of Legislative Behavior in the Colombian Congress
The Emergence of Legislative Behavior in the Colombian CongressThe Emergence of Legislative Behavior in the Colombian Congress
The Emergence of Legislative Behavior in the Colombian Congress
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 

(I'm trying to make a menu that repeats unless you enter 4- How do I g.pdf

  • 1. (I'm trying to make a menu that repeats unless you enter 4. How do I get this to repeat the printMenu()Method that prints the options and keeps repeating options until you hit exit #4?) public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); printMenu(); int x = input.nextInt(); if ( x == 1) countPunctuation(); if ( x == 2) charactertoBinary(); if ( x == 3) binaryToCharacter(); if (x == 4) System.out.print("You have chosen Exit. Goodbye"); if (x > 4) System.out.print("Error"); printMenu(); if (x < 1) System.out.print("Error"); } // Create first Method. Print Menu*** public static void printMenu(){ String newline = System.getProperty("line.separator"); System.out.print("Enter '1' to count punctuation symbols in a String." + newline + "Enter '2' to convert characters to binary." + newline + "Enter '3' to convert 8-bit binary to a character." + newline + "Enter '4' to exit."+newline +"Enter option:"); }