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
lina2011 [118]
2 years ago
11

How do I write this code in java? input "Enter Your Age to Order a Beer"

Computers and Technology
1 answer:
Klio2033 [76]2 years ago
5 0

Answer:

i dont know sorry but answer above lol

Explanation:

You might be interested in
What is the output of this code? import java.util.HashSet; class A { public static void main(String[ ] args) { HashSet set = new
kompoz [17]

Answer:

The code will give an error that is "At least one public class is required in main file".

Explanation:

In the given code if we do not use the public access modifier to the class. It will give an error so, the correct code to this question as follows:

Program:

import java.util.HashSet; //import package

public class A  //define class as public.

{

   public static void main(String[ ] args) //define main method.

   {

       HashSet set = new HashSet(); //creating hashset object.

       set.add("A"); //add alphabet in hashset

       set.add("B"); //add alphabet in hashset

       set.add("C"); //add alphabet in hashset

       System.out.print("Size of HashSet is :"set.size()); //print the size of hashset.

   }

}

Output:

Size of HashSet is : 3

Explanation of the program:  

  • In the above program, we define a public class that is "A" and inside the class, we define the main method.  
  • Inside the main method, we create a HashSet class object that is "set".  
  • To add elements in HashSet we use add() function that adds elements and in the last, we use the size() function that prints the size HashSet.
5 0
2 years ago
If your vehicle leaves the pavement for any reason, remember to take your foot off the gas pedal, hold the wheel firmly, and____
aleksandr82 [10.1K]
A- and steer in a straight line 
8 0
3 years ago
Read 2 more answers
Does a 21.6v battery work with a 24 volt controller
Mila [183]
Yes but you will need more than one battery
3 0
3 years ago
How do big organizations take back their data to be reviewed after a disaster?
Jet001 [13]
Here a 5 step recovery plan, I have been in IT for 8 years

1. Create a disaster recovery team.

The team will be responsible for developing, implementing, and maintaining the DRP. A DRP should identify the team members, define each member’s responsibilities, and provide their contact information. The DRP should also identify who should be contacted in the event of a disaster or emergency. All employees should be informed of and understand the DRP and their responsibility if a disaster occurs.

2. Identify and assess disaster risks.

Your disaster recovery team should identify and assess the risks to your organization. This step should include items related to natural disasters, man-made emergencies, and technology related incidents. This will assist the team in identifying the recovery strategies and resources required to recover from disasters within a predetermined and acceptable timeframe.

3. Determine critical applications, documents, and resources.

The organization must evaluate its business processes to determine which are critical to the operations of the organization. The plan should focus on short-term survivability, such as generating cash flows and revenues, rather than on a long term solution of restoring the organization’s full functioning capacity. However, the organization must recognize that there are some processes that should not be delayed if possible. One example of a critical process is the processing of payroll.

4. Specify backup and off-site storage procedures.

These procedures should identify what to back up, by whom, how to perform the backup, location of backup and how frequently backups should occur. All critical applications, equipment, and documents should be backed up. Documents that you should consider backing up are the latest financial statements, tax returns, a current list of employees and their contact information, inventory records, customer and vendor listings. Critical supplies required for daily operations, such as checks and purchase orders, as well as a copy of the DRP, should be stored at an off-site location.

5. Test and maintain the DRP.

Disaster recovery planning is a continual process as risks of disasters and emergencies are always changing. It is recommended that the organization routinely test the DRP to evaluate the procedures documented in the plan for effectiveness and appropriateness. The recovery team should regularly update the DRP to accommodate for changes in business processes, technology, and evolving disaster risks.



summary :an organization must develop a recovery team to create a disaster recovery plan that includes identifying and assessing disaster risks, determining critical applications, and specifying backup procedures. Other procedures may be included in the plan based on the organization. The recovery team and organization must then implement the DRP and follow through on the plan procedures. The DRP should be continually tested and maintained to consistently prepare the organization for evolving disasters and emergencies.
4 0
2 years ago
Perform algorithm time measurement for all three quadratic sorting algorithms for Best Case (already sorted), Average Case (rand
Kaylis [27]

Answer:

Experiment size : 50,000

==================================

Selection sort :

---------------------------------------------------------

Worst case : 0.162

Average case : 0.116

Best case : 0.080

Insertion sort :

---------------------------------------------------------

Worst case : 0.162

Average case : 0.116

Best case : 0.080

Bubble sort:

--------------------------------------------------------

Worst case : 0.211

Average case : 0.154

Best case : 0.117

Experiment size : 100,000

==================================

Selection sort :

---------------------------------------------------------

Worst case : 0.316

Average case : 0.317

Best case : 0.316

Insertion sort :

---------------------------------------------------------

Worst case : 0.316

Average case : 0.317

Best case : 0.316

Bubble sort:

--------------------------------------------------------

Worst case : 0.482

Average case: 0.487

Best case : 0.480.

Experiment size : 200,000

==================================

Selection sort :

---------------------------------------------------------

Worst case : 1.254

Average case : 1.246

Best case : 1.259

Insertion sort :

---------------------------------------------------------

Worst case : 1.254

Average case : 1.246

Best case : 1.259

Bubble sort:

--------------------------------------------------------

Worst case : 1.990

Average case : 2.009.

Best case : 1.950

Explanation:

[NB: since it is very long there is the need for me to put it it a document form. Kindly check the doc. Files. The file A is the sort Analysis.Java file and the file B is the sort.Java file].

The concept of algorithm time measurement strictly depends on the following;

=> The measurement of time, space or energy on different sizes.

=> Plotting of the measurements and characterizing them.

=> Running or implementation of the algorithm.

Programming language such as Java can be used in accessing the operating system clock and Java had two static methods.

KINDLY CHECK BELOW FOR THE ATTACHMENT.

Download doc
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> doc </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> doc </span>
5 0
3 years ago
Other questions:
  • The ____ contains methods that allow you to set physical properties such as height and width, as well as methods that allow you
    14·1 answer
  • There is a colony of 8 cells arranged in a straight line where each day every cell competes with its adjacent cells(neighbour).
    11·1 answer
  • Because public key encryption requires the use of two different keys, it is also known as _____ encryption
    13·1 answer
  • What is a spreadsheet program?<br> A spreadsheet program is a computerized version of_________.
    6·2 answers
  • Which best describes a difference between transcription and DNA replication
    8·2 answers
  • 3. Create mode was one of the most innovative and influential features of which of the following games?
    7·1 answer
  • On a Windows system, which Task Manager tab would you use to adjust the priority given to a specific program
    13·1 answer
  • Pls need this asap
    14·2 answers
  • Which file type is the best choice if the image will be made into a billboard?
    12·1 answer
  • A vlan ________.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!