Menu mobile
Home
Programming
Python Tutorial
Java Tutorial
C Tutorial
C++ Tutorial
Web Technology
HTML
CSS
Java Script
PHP
React JS
Node JS
Assignment
MS Office
HTML
CSS
Bootstrap
Java Script
JQuery
AngularJs
Project
Blog
QUIZ ON : java - JAVA LIBRARY CLASSES
JAVA LIBRARY CLASSES
00:00:00
English
Hindi
Question No# :
01
out of 21
Which among the following class do not belong to the java.lang package?
Which among the following class do not belong to the java.lang package?
A.
System
System
B.
String
String
C.
Math
Math
D.
Scanner
Scanner
Question No# :
02
out of 21
Which of the following is not a wrapper class?
Which of the following is not a wrapper class?
A.
Byte
Byte
B.
Int
Int
C.
Long
Long
D.
Float
Float
Question No# :
03
out of 21
Which among the following Scanner methods allows us to input a number with a decimal point?
Which among the following Scanner methods allows us to input a number with a decimal point?
A.
nextInt()
nextInt()
B.
nextFloat()
nextFloat()
C.
nextDecimal()
nextDecimal()
D.
nextPoint()
nextPoint()
Question No# :
04
out of 21
Which among the following function returns the absolute value of a number?
Which among the following function returns the absolute value of a number?
A.
Math.absoulute( )
Math.absoulute( )
B.
Math.neutral( )
Math.neutral( )
C.
Math.abs( )
Math.abs( )
D.
Math.positive( )
Math.positive( )
Question No# :
05
out of 21
Which class is inherited by the Character and Boolean wrapper classes?
Which class is inherited by the Character and Boolean wrapper classes?
A.
Object
Object
B.
Number
Number
C.
Both a and b
Both a and b
D.
None of these
None of these
Question No# :
06
out of 21
What package is a part of the wrapper class which is imported by default into all Java programs?
What package is a part of the wrapper class which is imported by default into all Java programs?
A.
java.util
java.util
B.
java.lang
java.lang
C.
java.awt
java.awt
D.
None of these
None of these
Question No# :
07
out of 21
What is, converting a primitive value into an object of the corresponding wrapper class called?
What is, converting a primitive value into an object of the corresponding wrapper class called?
A.
Autoboxing
Autoboxing
B.
Unboxing
Unboxing
C.
Type Casting
Type Casting
D.
All of these
All of these
Question No# :
08
out of 21
What value will Math.sqrt(Math.ceil(8.1)) return?
What value will Math.sqrt(Math.ceil(8.1)) return?
A.
9.0
9.0
B.
9
9
C.
3.0
3.0
D.
4.0
4.0
Question No# :
09
out of 21
What is the return type of Math.min(1,2.0f)?
What is the return type of Math.min(1,2.0f)?
A.
float
float
B.
double
double
C.
int
int
D.
long
long
Question No# :
10
out of 21
What value will Math.sqrt(-9) return?
What value will Math.sqrt(-9) return?
A.
-3.0
-3.0
B.
3.0
3.0
C.
NaN
NaN
D.
None of these
None of these
Question No# :
11
out of 21
If s=“123”, which among the following will convert it to an integer?
If s=“123”, which among the following will convert it to an integer?
A.
int a=Integer(s);
int a=Integer(s);
B.
int a=(int)s;
int a=(int)s;
C.
int a=parseInt(s);
int a=parseInt(s);
D.
int a=Integer.parseInt(a);
int a=Integer.parseInt(a);
Question No# :
12
out of 21
Which among the following expression will return a random integer between 5 and 10 both inclusive?
Which among the following expression will return a random integer between 5 and 10 both inclusive?
A.
5+(int)(Math.random()*6)
5+(int)(Math.random()*6)
B.
5+(int)(Math.random()*10)
5+(int)(Math.random()*10)
C.
5+Math.random()*6
5+Math.random()*6
D.
5+Math.random()*10
5+Math.random()*10
Question No# :
13
out of 21
The member ‘out’ object of the ‘System’ class belongs to which class?
The member ‘out’ object of the ‘System’ class belongs to which class?
A.
System
System
B.
Print
Print
C.
PrintStream
PrintStream
D.
Println
Println
Question No# :
14
out of 21
Which among the following methods return a true or a false?
Which among the following methods return a true or a false?
A.
toLowerCase()
toLowerCase()
B.
toUpperCase()
toUpperCase()
C.
parseInt()
parseInt()
D.
isUpperCase()
isUpperCase()
Question No# :
15
out of 21
Which among the following function is equivalent to Math.sqrt(a)?
Which among the following function is equivalent to Math.sqrt(a)?
A.
Math.cbrt(a);
Math.cbrt(a);
B.
Math.pow(a,1/2)
Math.pow(a,1/2)
C.
Math.pow(a,1/2.0);
Math.pow(a,1/2.0);
D.
Math.
Math.
Question No# :
16
out of 21
Which among the following will yield -1 for negative number and 1 for positive number for a number stored in a variable a?
Which among the following will yield -1 for negative number and 1 for positive number for a number stored in a variable a?
A.
Math.abs(a)*a
Math.abs(a)*a
B.
Math.abs(a) / a
Math.abs(a) / a
C.
Math.ceil(a) / Math.floor(a)
Math.ceil(a) / Math.floor(a)
D.
None of these
None of these
Question No# :
17
out of 21
Which among the following package is imported by default:
Which among the following package is imported by default:
A.
java.lang
java.lang
B.
java.util
java.util
C.
Both a and b
Both a and b
D.
None of these
None of these
Question No# :
18
out of 21
Which among the following function is used to check whether a given character is a tab space or not?
Which among the following function is used to check whether a given character is a tab space or not?
A.
isTab()
isTab()
B.
isTabSpace()
isTabSpace()
C.
isSpace()
isSpace()
D.
isWhitespace()
isWhitespace()
Question No# :
19
out of 21
Which among the following is valid character initialisation?
Which among the following is valid character initialisation?
A.
Character c=new Character(‘c’);
Character c=new Character(‘c’);
B.
Character c=new Character(“câ€);
Character c=new Character(“c”);
C.
Both a and b
Both a and b
D.
None of these
None of these
Question No# :
20
out of 21
Which of the following is valid method of initialising?
Which of the following is valid method of initialising?
A.
Integer a=new (5);
Integer a=new (5);
B.
Integer a=Integer(5);
Integer a=Integer(5);
C.
Integer a=new Integer(5);
Integer a=new Integer(5);
D.
Integer a=new (“5â€);
Integer a=new (“5”);
Question No# :
21
out of 21
Which among the following gives the next mathematical integer?
Which among the following gives the next mathematical integer?
A.
Math.floor( )
Math.floor( )
B.
Math.ceil( )
Math.ceil( )
C.
Math.random( )
Math.random( )
D.
All of these
All of these
Latest Current Affairs 2024
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2024
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level Online Test in Hindi
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Naukari Notification
Best Website and Software Company in Allahabad
Sarkari Exam Quiz