No student devices needed.ย Know more
14 questions
Name the package that contains Scanner class.
Complete the code below to create an object of Scanner class:
Scanner sc = new Scanner(______);
Name the type of error in case given below:
Missing semicolon.
Syntax Error
Logical Error
Run-time error
Name the method of Scanner class that is used to input an integer data from the standard input stream.
Name the type of error in case given below:
int a;b;c;
Syntax Error
Logical Error
Run-time error
Which of the following are valid comments?
/* comment */
* comment
// coment
*/ comment */
Name the type of error in case given below:
Math.sqrt(36 โ 45)
Syntax Error
Logical Error
Run-time error
Name the method of Scanner class that is used to input a String data from the standard input stream.
Name the type of error in case given below:
Multiplication operator used when the operation should be division.
Syntax Error
Logical Error
Run-time error
Name the keyword, to use the classes defined in a package.
Name the package that is invoked by default.
Name the type of error in case given below:
Division by a variable that contains a value of zero.
Syntax Error
Logical Error
Run-time error
Name the keyword used to call a package in the program.
Which of the following is not a valid comment in Java?
Single line comment
Double line comment
Multi line comment
Documentation comment