1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Tamiku [17]
3 years ago
12

Display list of numbered or lettered choices for actions

Computers and Technology
1 answer:
Stells [14]3 years ago
5 0

Answer:

import java.util.Scanner;

public class num1 {

   public static void main(String[] args) {

       System.out.println("Age Greater than 18?");

       System.out.println("Y = \"Yes\"\t N = \"No\"");

      Scanner in = new Scanner(System.in);

      char response = in.next().charAt(0);

     switch(response) {

         case 'Y':

         case 'y':

             System.out.println("You can Visit this Website");

             break;

         case 'N':

         case 'n':

             System.out.println("You are to young to visit this website");

             break;

         default:

             System.out.println("You response is not valid");

     }

   }

}

Explanation:

  • Using Java programming language
  • create a list of options for users to input "yes" or "no"
  • Using the imported scanner class, prompt, receive and store the user's response in a char variable.
  • Use the switch statement in an expression to test user input and print appropriate message.
  • If there is no match print the default message

You might be interested in
For Java, a program is converted from a text file of code into an executable file by the process of ?
Ludmilka [50]
Ever coded in Java before? What's the thing you have to do each time you save the code in order for it to run properly?
6 0
2 years ago
Please select the word from the list that best fits the definition
Svetllana [295]

A pie graph shows the percent something takes of a whole. With a pie graph it is always out of 100%, therefor for this question the answer is B. Pie graph

I hope this helped!

7 0
3 years ago
The primary advantage of hexadecimal notation, compared with binary notation, is its ____________________.
VARVARA [1.3K]

Answer: Compactness

Explanation:

4 0
2 years ago
Read 2 more answers
Can someone write me a cyber bullying brochure I need it ASAP
Sever21 [200]

Answer:

how quick do you need it

8 0
2 years ago
Read 2 more answers
During the reconnaissance step of the attack, what open ports were discovered by Zenmap? What services were running on those por
Setler [38]

Answer:

Following are the solution to the given question:

Explanation:

It sends commands to its Nmap executable platForm, which is used to specified and retrieves the production. The  ZenMap utilizes templates, which are primarily Nmap.

The parameter templates to decide how scans become formed Several ports, like ports, are available: 11, 21, 22, 25, 53, 445, and 3306, all of which run TCP: Linux services, SMTP Postfix, Apache Tomcat/Coyote JSP.

5 0
3 years ago
Other questions:
  • ________ returns the last character in a StringBuilder variable named strBuf? Select one: A. strBuf.charAt(strBuf.length() - 1)
    15·1 answer
  • How can i use css/html coding to create links
    15·1 answer
  • While you are working with a document using a program such as wordpad, the document is stored in ___________?
    15·2 answers
  • ​In sql server, the cursor property ____________________ means that the cursor is used for retrieval purposes only.
    9·1 answer
  • Why did Hunter gatherers moved into the<br>America's?​
    8·1 answer
  • When compared to traditional desktop customers, why are mobile phone users much more likely to book a room or airline reservatio
    12·1 answer
  • A firm offers virtual local area networks and firewalls as an on-demand cloud service. Which service does the firm offer?
    11·2 answers
  • Shira’s Shoes sold 875,000 pairs of sandals in June, which was 70% of the total number of shoes sold. How many shoes did the com
    14·2 answers
  • User defined blocks of code can be created in
    13·1 answer
  • In your own words, explain the FNAF timeline
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!