Font size
WorksheetsQUIZ MS Core Java Quiz-3 2023
Total questions: 11
Worksheet time: 6mins
readLine() return / input which type of value by default?
int
float
String
All of the given
Select TWO classes from io package.
Scanner
InputStreamReader
String
BufferedReader
Give correct way of calling readLine().
readLine();
buffered_reader_object . readLine();
scanner_object . readLine();
None of the given
parseInt() is used for?
Input int
Convert String to int
Convert int to String
Input String
Apurva want to input her city name, which one is CORRECT?
String city=Integer.parseInt(br_obj . readLine());
String city=br_obj . readLine();
String city=Integer.parseString(br_obj . readLine());
String city=readLine());
parseFloat() is used for?
Input float
Convert String to float
Convert float to String
Input String
parseInt() is a _______________ .
function
class
object
package
Pavan want to use readLine() to input his name? Which import statement he should write at the top of the program?
import java.io.*;
import java.util.*;
import java.awt.*;
Import java.io.*;
class Demo
{
class_body;
main() function body;
}
By which name above program should be saved?
Demo.java
Demo.class
class.Demo
java.Demo
Which is a correct way of compiling Demo.java program?
javac Demo.java
java Demo.java
java Demo
javac Demo
When we compile Demo.java program we get Bytecode __________ .
Demo.class
Demo.java
Demo
