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
Alexus [3.1K]
3 years ago
11

Explain the process of creating a switch statement to replace an if-then-else statement in Java.

Computers and Technology
1 answer:
musickatia [10]3 years ago
7 0

Answer:

The answer to this question is given in the explanation section.

Explanation:

Let look at an if the else statement

if (condition1) {

 //some code if condition 1 is true

} else if (condition2) {

 // some code if condition 2 is true

} else {

 // some code if condition 3 is true

}

No let look at switch statement

switch(expression) {

 case x:

   // code block

   break;

 case y:

   // code block

   break;

 default:

   // code block

Now let look at your answer.

if then else should be replaced with switch if conditions are fixed.

in the process of replacing

write your condition of if statement  in the case area of swatch

You might be interested in
A software computer error, is a error produced by the malfunctioning of a computer part. E.g. RAMImmersive Reader
Andru [333]

Answer:

? is this you question true or false because i dont know the answer yet

Explanation:

4 0
3 years ago
How do hardware and software work together to allow a user to perform a function?
qaws [65]

Answer:

jointly

Explanation:

Because Hardware and Soft ware have to JOIN together to make something work

I hope i helped!

4 0
3 years ago
Read 2 more answers
The list of abbreviations, punctuation, symbols, typefaces, and instructional notes that appears at the beginning of the ICD and
Ilia_Sergeevich [38]

Answer: Conventions

Explanation: Convention is the writing activity with the components like punctuation,grammar,symbols,note etc to make the written content understandable and clear. This feature is used because people can understand the meaning of content read by them without initializing it later.

As soon as the reader finishing the reading the information should be clear in his/her mind so that they don't have to figure it out after reading.Convention enhances the value of reading and learning by it's feature .

4 0
3 years ago
A software team is setting an automation strategy and begins by identifying business processes that could benefit from automatio
mixas84 [53]

B is what I would guess.

5 0
3 years ago
What type of software can you use to capture and examine the contents of network messages?
Ludmilka [50]
They're usually referred to as packet sniffers.
7 0
3 years ago
Other questions:
  • What is the Windows command to see the IP configuration of the PC?
    15·1 answer
  • A typical serial cable has
    13·1 answer
  • Briefly explain the cooling mechanism implemented in a fanless laptop
    15·1 answer
  • 5. ADD A STATEMENT OR STATEMENTS to the program on the following page (including constant and/or variable declarations if you wa
    6·1 answer
  • Are you allowed to copy and paste answers on brainy to give answers to other people?
    5·2 answers
  • Computer technology has changed our lives write of a least five ways to show how this is so​
    15·1 answer
  • Question :
    6·1 answer
  • Write Tic tac toe program in python for beginners pls
    10·1 answer
  • What is incorrect about the following code? Suggest a possible revision of the code to correct the error.
    13·1 answer
  • ACTIVITY NO. 5 (DAY 5) FACT OR BLUFF. Write Fact if the statement is correct and write Bluff if it is incorrect.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!