Skip to main content

Java Iterations | Accenture TFA

Question 1

Correct
Mark 1.00 out of 1.00
Flag question

Question text

The break statement cannot be present for _____________ construct.

Select one:
 

Feedback

Question 2

Correct
Mark 1.00 out of 1.00
Flag question

Question text

Using Java we can develop ___________________.


Select one:
 

Feedback

Question 3

Correct
Mark 1.00 out of 1.00
Flag question

Question text

The main method in java should ___________.


Select one:
 

Feedback

Question 4

Correct
Mark 1.00 out of 1.00
Flag question

Question text

A continue statement makes the execution jump to ______________.

Select one:
 

Feedback

Question 5

Correct
Mark 1.00 out of 1.00
Flag question

Question text

The ________________ statement causes the program execution to stop and JVM to shut down.


Select one:
 

Feedback

Question 6

Correct
Mark 1.00 out of 1.00
Flag question

Question text

What will be the output of the program?

public class Sample   {

    final static short a = 2;

    public static int b = 0;

    public static void main(String [] args)      {

        for (int c=0; c < 4; c++)

        {

            switch (c)   {

                case a: System.out.print("a ");

                default: System.out.print("default ");

                case a-1: System.out.print("a-1 ");

                            break;

                case a-2: System.out.print("a-2 ");

            }

        }

    }

}


Select one:
 

Feedback

Question 7

Correct
Mark 1.00 out of 1.00
Flag question

Question text

JRE comprises of ___________ and ___________.


Select one or more:
 

Feedback

Question 8

Correct
Mark 1.00 out of 1.00
Flag question

Question text

Identify the features of java.

Select one or more:
 
 

Feedback

Question 9

Correct
Mark 1.00 out of 1.00
Flag question

Question text

In a for loop, if the number of statements are greater than one, which of the following needs to be inserted at the beginning and the end of the loop?


Select one:
 

Feedback

Comments