Loops in java program


Question 1: Fill up the blanks:

a) To exit a loop before it is completed, the _______ statement can be employed.

b) To check a condition which in turn checks the condition again is done via _______.

c) To check the condition at first and then execute the action can be done via _________ .

d) To begin with a certain point throughout the loop can be done via _________.

Question 2: State whether the given statement are true or false:

a) The while loop is a post tested loop.

b) Continue statement is employed to skip the rest of the loop and begin again from the starting of the loop.

Question 3: Write down a Java program to convert meters to kilometers and display the result.

Question 4: Write down a Java program which will reverse a given number (i) passed to it as a command line argument.

Question 5: Declare a constant in a program and display the reversed number.

Question 6: Write down a Java program which will display the Fibonacci Series 112358 . . . .

Question 7: Write down a program which will display the command line arguments passed to it with the provisions that the:

a) Loop will break if one of the command line arguments is ‘Goodbye’.

b) The loop will continue from the starting, skipping the rest of the loop if one of the arguments is ‘Welcome’.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Loops in java program
Reference No:- TGS08710

Expected delivery within 24 Hours