Menu mobile
Home
PYTHON
Python Tutorial
Program Example
Interview Questions
JAVA
Java Tutorial
Program Example
Interview Questions
C Language
C Tutorial
Program Example
Interview Questions
Web Design
HTML
CSS
Java Script
PHP
Assignment
MS Office
HTML
CSS
Java Script
QUIZ ON : JAVA - USING LIBRARY CLASSES
USING LIBRARY CLASSES
00:00:00
English
Hindi
Question No# :
01
out of 31
Which among the following function is used to check whether a given character is a tab space or not?
A.
isTab()
B.
isTabSpace()
C.
isSpace()
D.
isWhitespace()
Question No# :
02
out of 31
Which among the following package is imported by default:
A.
java.lang
B.
java.util
C.
Both a and b
D.
None of these
Question No# :
03
out of 31
What is the return type of Math.min(1,2.0f)?
A.
float
B.
double
C.
int
D.
long
Question No# :
04
out of 31
What package is a part of the wrapper class which is imported by default into all Java programs?
A.
java.util
B.
java.lang
C.
java.awt
D.
None of these
Question No# :
05
out of 31
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
B.
Math.abs(a) / a
C.
Math.ceil(a) / Math.floor(a)
D.
None of these
Question No# :
06
out of 31
Math.max( ) returns the number having maximum number of digits.
A.
TRUE
B.
FALSE
Question No# :
07
out of 31
Which class is inherited by the Character and Boolean wrapper classes?
A.
Object
B.
Number
C.
Both a and b
D.
None of these
Question No# :
08
out of 31
If s=“123”, which among the following will convert it to an integer?
A.
int a=Integer(s);
B.
int a=(int)s;
C.
int a=parseInt(s);
D.
int a=Integer.parseInt(a);
Question No# :
09
out of 31
What value will Math.sqrt(Math.ceil(8.1)) return?
A.
9.0
B.
9
C.
3.0
D.
4.0
Question No# :
10
out of 31
Which among the following gives the next mathematical integer?
A.
Math.floor( )
B.
Math.ceil( )
C.
Math.random( )
D.
All of these
Question No# :
11
out of 31
It is possible to find the square root of a number using the Math.pow() function.
A.
TRUE
B.
FALSE
Question No# :
12
out of 31
The member ‘out’ object of the ‘System’ class belongs to which class?
A.
System
B.
Print
C.
PrintStream
D.
Println
Question No# :
13
out of 31
What value will Math.sqrt(-9) return?
A.
-3.0
B.
3.0
C.
NaN
D.
None of these
Question No# :
14
out of 31
Which among the following expression will return a random integer between 5 and 10 both inclusive?
A.
5+(int)(Math.random()*6)
B.
5+(int)(Math.random()*10)
C.
5+Math.random()*6
D.
5+Math.random()*10
Question No# :
15
out of 31
Which among the following class do not belong to the java.lang package?
A.
System
B.
String
C.
Math
D.
Scanner
Question No# :
16
out of 31
Which among the following function returns the absolute value of a number?
A.
Math.absoulute( )
B.
Math.neutral( )
C.
Math.abs( )
D.
Math.positive( )
Question No# :
17
out of 31
Which of the following is not a wrapper class?
A.
Byte
B.
Int
C.
Long
D.
Float
Question No# :
18
out of 31
Which among the following Scanner methods allows us to input a number with a decimal point?
A.
nextInt()
B.
nextFloat()
C.
nextDecimal()
D.
nextPoint()
Question No# :
19
out of 31
Math. rint(12.5) will return 12.0.
A.
TRUE
B.
FALSE
Question No# :
20
out of 31
Math.random( ) returns a random number between 0 and 1 in decimal.
A.
TRUE
B.
FALSE
Question No# :
21
out of 31
Math.round() function returns an int value if the parameter is float data type and long value if the parameter is of double data type.
A.
TRUE
B.
FALSE
Question No# :
22
out of 31
Which among the following methods return a true or a false?
A.
toLowerCase()
B.
toUpperCase()
C.
parseInt()
D.
isUpperCase()
Question No# :
23
out of 31
Math.sqrt() function is used to find the square of a number.
A.
TRUE
B.
FALSE
Question No# :
24
out of 31
You cannot find the cube root of a number in Java.
A.
TRUE
B.
FALSE
Question No# :
25
out of 31
Math.abs() function is used to round off a real number to the nearest integer.
A.
TRUE
B.
FALSE
Question No# :
26
out of 31
Which of the following is valid method of initialising?
A.
Integer a=new (5);
B.
Integer a=Integer(5);
C.
Integer a=new Integer(5);
D.
Integer a=new (“5”);
Question No# :
27
out of 31
Which among the following is valid character initialisation?
A.
Character c=new Character(‘c’);
B.
Character c=new Character(“c”);
C.
Both a and b
D.
None of these
Question No# :
28
out of 31
NaN stands for Not a Number, which is received when you pass a negative number to the Math.sqrt() function.
A.
TRUE
B.
FALSE
Question No# :
29
out of 31
Which among the following function is equivalent to Math.sqrt(a)?
A.
Math.cbrt(a);
B.
Math.pow(a,1/2)
C.
Math.pow(a,1/2.0);
D.
Math.
Question No# :
30
out of 31
What is, converting a primitive value into an object of the corresponding wrapper class called?
A.
Autoboxing
B.
Unboxing
C.
Type Casting
D.
All of these
Question No# :
31
out of 31
Math.ceil() and Math.floor() are same.
A.
TRUE
B.
FALSE
CCC Online Test 2021
CCC Practice Test Hindi
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 NIELIT Study material and Quiz
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Naukari Notification
Best Website and Software Company in Allahabad
Website development Company in Allahabad