Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

18. lastname1122 What will be printed by the following code segment? String firstname = Bill, lastname = Gates; System.out.printin(lastname +11+22 ); 19. Pi has the

image text in transcribed
18. lastname1122 What will be printed by the following code segment? String firstname = "Bill", lastname = "Gates"; System.out.printin("lastname" +11+22 ); 19. Pi has the value 3.14. What will be printed by the following code segment? float pi =3.14159; System.out.printf("Pi has the value %5.2f."pi); 20. // my name or / m my name */ Comment lines may be used in a Java program to improve readability. Write a comment line to include your full name in it. 21. infinite In a for ... loop, it is allowed for the condition part be omitted. If there is no condition then the body of the loop will be executed for. times. 22. AlabamaState What will be printed if x has the value 5 ? switch (x) f case 5: System.out.print("Alabama"); case 4: System.out.print("State"); break; case 2: System.out.print("University"); break; case 1: System.out.print("Go"); default: System.out.print("Hornets"); \} 23. 42 In the loop below, how many times "Java" will be printed? for (x=7;x>1;x=) for (y=1;y11) System.out.print(" x is just right" ); else if (x!=0)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Derive expressions for the rates of forward and reverse reactions?

Answered: 1 week ago

Question

Write an expression for half-life and explain it with a diagram.

Answered: 1 week ago

Question

What do you mean by underwriting of shares ?

Answered: 1 week ago

Question

Define "Rights Issue".

Answered: 1 week ago