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

Find the measures of the following complementary angles.
One of Jacinta's regular clients sends her an email accusing her of charging more money for a couch than it is really worth. The client claims that she found an
HELP FAST PLEASE worth 25 points How does modern technology impact relative and absolute location?
Rewrite the expression in the form k*z^n
An employee's weekly salary is $550 plus $25 per hour of overtime. Find a function P(x) giving his pay (in dollars) for a week in which he worked x hours of ove
How did Native Americans use their natural resources to survive?
Please help Me ASAP please thank you! No random post or links
Unlike a eukaryotic cell, a prokaryotic cell lacks A DNA and cytoplasm. B a cell wall and cell membrane. C ribosomes and energy-propelled flagella. D a nucl
Question 1( What is the main idea of this paragraph? Susan loves to play piano. She plays all sorts of music, from classical to modern. Every day she comes home
what can you infer from the statement, velocity is an object is zero?