sadeem50 sadeem50
  • 10-11-2020
  • Computers and Technology
contestada

What is the output of the below Java program?
int a=1:
while (a=4)
{
System.out.print(a + "");
a ++:
}
What is the output of the following java program

Respuesta :

skowronkow skowronkow
  • 10-11-2020

Answer:

If you fix your program: instead of "while (a=4)" you will have: while(a<4)

It wil print:

> 123

Explanation:

You can check the output of that kind of programs in online repl consoles e.g: https://repl.it/languages/java10

Answer Link

Otras preguntas

QUESTION 13 What happened in 1917 in Russia? (4 of the 5 answers are correct) Alexander II was murdered by political terrorists. The Russian Revolution The Bols
Judd Enterprises These are the simplified financial statements for Judd Enterprises. Income statement Current Projected Sales na 1,0
Savanna is paying a scribe background
Simplify please help
Describe the characteristics that identify a sample of matter as a substance.
Which best explains why some people get life insurance and others don't? Different people are willing to face different kinds of risks. Life insurance is a cost
why do you think the declaration of independence was written
The radius of a uranium atom is 149 pm. How many uranium atoms would have to be laid side by side to span a distance of 4.96 mm?
If you were to solve the following system by substitution, what would be the best variable to solve for and from what equation?​
Daniel Sawyer, the CEO of the Sawyer Group, is initiating planning for the company's operations next year, and he wants you to forecast the firm's additional fu