Selenium 3.0 Quiz Questions and Answers

What is the range of byte data type in java?

Answer :
  • 8 bits
  • -128 to 127

Why is the import keyword is used in java?

Answer :
  • To makes classes and interfaces available and accessible to the current source code.

Why is a new keyword is used in java?

Answer :
  • To create new objects.

Identify the correct syntax to run a java program?

Answer :
  • float f= 1.8f;
  • float f= 1.8f;

Why is the char keyword used in java?

Answer :
  • To declare a variable that can hold unsigned 16-bit Unicode characters.

What is a boolean keyword in java?

Answer :
  • Both a and b

Why is 'for' loop used in java?

Answer :
  • It is used to execute a set of instructions/functions repeatedly

Identify the components of a for loop?

Answer :
  • All of the above

Which of the following statements has to be used to print numbers from 0 to 5?

Answer :
  • for (int i = 0; i < = 5; i++) System.out.println(i);

What is recommended to use if the number of iterations is not fixed?

Answer :
  • while loop