ExamLookup
Menu mobile
Home
Current Affairs
General Knowledge
Computer
Python
HTML
MCQ CORE JAVA - JAVA LIBRARY CLASSES MCQ Questions
English
Hindi
Question No. -
11
Report Bug
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. -
12
Report Bug
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. -
13
Report Bug
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. -
14
Report Bug
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. -
15
Report Bug
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. -
16
Report Bug
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
Question No. -
17
Report Bug
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. -
18
Report Bug
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. -
19
Report Bug
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. -
20
Report Bug
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
1
2
3
4
CCC Online Test 2021
CCC Practice Test Hindi
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
O Level NIELIT Study material and Quiz
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Exam Quiz
Website development Company in Allahabad