MCQExams
0:0:1
CBSE
JEE
NTSE
NEET
Practice
Homework
×
Computer Science
Java
_________ operator returns the remainder after division
Report Question
0%
+
0%
/
0%
%
0%
*
________ operator is used to check the equality of two values
Report Question
0%
>=
0%
=
0%
*=
0%
==
Bit wise operations only carried out only in integer /long integer values.
Report Question
0%
True
0%
False
Operator used to access the members of a class /package
Report Question
0%
(.) Dot
0%
(,) Comma
Java has goto statement
Report Question
0%
True
0%
False
Java doesn't support structures and unions
Report Question
0%
True
0%
False
Java is
Report Question
0%
platform dependent
0%
platform indeprndent
In Java WORA stands for
Report Question
0%
Write Once Recall Anywhere
0%
Write Once Return Anywhere
0%
Write Once Read Anywhere
0%
Write Once Run Anywhere
JVM stands for
Report Question
0%
Java Vital Machine
0%
Java Virtual Machine
0%
Java Vendor machine
Java programs ________________
Report Question
0%
are only compiled
0%
are only compiled not interpreted
0%
are only interpreted
0%
are both compiled and interpreted
In Java, execution starts from ___________ function.
Report Question
0%
get()
0%
main()
0%
java()
0%
display()
Main() method is not mandatory for a Java program
Report Question
0%
True
0%
False
Who developed Java?
Report Question
0%
James Gosling
0%
Bjarne Stroustrup
0%
Robert James
0%
None
JVM is responsible for machine to be platform independent.
Report Question
0%
TRUE
0%
FALSE
Choose most appropriate purpose of trim() method in String?
Report Question
0%
to remove white spaces
0%
to get a substring of the string
0%
to cut String at desired index
0%
to remove extra white spaces from start and end of String
What is Programming?
Report Question
0%
A city in Kansas
0%
Communicating using the computer
0%
Using the computer to execute a program
0%
None Of The Above
Which one of the following is correct ?
Report Question
0%
system.out.print
0%
System.out.printl
0%
System.Out.Print
0%
System.out.print
a= 22 , b= 12 , c= a+b . What is c
Report Question
0%
33
0%
35
0%
48
0%
34
a= 54 , b=39 , c= a-b . Find c.
Report Question
0%
15
0%
17
0%
16
0%
14
The text inside the double quotes (including the double quotes) is
Report Question
0%
Double Quotes
0%
String
0%
Integer
0%
Variable
This term we learnt to
Report Question
0%
Add,Subtract,Multiply,Divide
0%
Subtract,Add
0%
Add,Multiply
0%
Add,Subtract,Multiply
Which type of data is used to enter the value ("Welcome")?
Report Question
0%
Text
0%
Characters
0%
String
0%
Boolean
We are use Scanner Library in java for...
Report Question
0%
Give permissions to the user
0%
Correcting software errors
0%
Allows user to read data
0%
Allows the user to enter data
Which of the following is NOT a data types in java
Report Question
0%
int
0%
String
0%
number
0%
double
float myFloatNum = 5.99f;System.out.println(myFloatNum);What will be the output?
Report Question
0%
5.99
0%
5.99f
0%
"5.99"
0%
"5.99"f
int sum1 = 100 + 50;int sum2 = sum1 + 250;int sum3 = sum2 + sum2;System.out.println(sum3);What will be the final output?
Report Question
0%
950
0%
800
0%
sum2sum2
0%
sum1250
What is the output of below code?int x = 5;System.out.println(x++);System.out.println(x);
Report Question
0%
55
0%
66
0%
56
0%
65
String x = "10";String y = "20";String z = x + y;System.out.println(z);Guess the output.
Report Question
0%
1020
0%
10 20
0%
30
0%
"10 20"
Multiple inheritance allows a class to inherit characteristics and features from more than one abstract parent class. This allows a subclass to extend more than one superclass, in order to use the methods of each. Java supports multiple inheritance.
Report Question
0%
True
0%
False
Exception and Error are immediate subclasses of a class called
Report Question
0%
Object
0%
Throwable
0%
AWT
0%
`Pane
The following Syntax is used for?class Subclass-name extends Superclass-name { //methods and fields },
Report Question
0%
Polymorphism
0%
Encapsulation
0%
Inheritance
0%
None of the above
_______ Operator is used to create an object.
Report Question
0%
class
0%
new
0%
print
0%
main
A class that is inherited is called a ______ .
Report Question
0%
superclass
0%
Subclass
0%
subsetclass
0%
Relativeclass
True or False : Java is case sensitive, which means identifier Hello and hello would have different meaning in Java
Report Question
0%
True
0%
False
Inheritance is used when the relationship between two classes is a(n) _______ relationship.
Report Question
0%
"HAS-A"
0%
"PART-OF-A"
0%
"IS-A"
0%
inverse
What is the advantage of Exception Handling
Report Question
0%
To avoid abnormal termination of a program
0%
To find out errors
0%
To Debug program
0%
None of these
How to create our own exception
Report Question
0%
using 'throw' keyword
0%
using 'throws' keyword
0%
using 'finally' keyword
0%
using 'throwable' keyword
Which method is used to wait for child threads to finish in Java?
Report Question
0%
Wait ()
0%
Sleep ()
0%
Join ()
0%
isAlive()
Thread priority in Java is?
Report Question
0%
Integer
0%
Float
0%
Double
0%
Long
Consider the following Java program : public class Compute { public static void main (string args [ ]) { int result, x ; x = 1 ; result = 0; while (x < = 10) { if (x%2 == 0) result + = x ; + + x ; }, System.out.println(result) ; }, }, Which of the following will be the output of the above program?
Report Question
0%
55
0%
30
0%
25
0%
35
What is a keyword used in extending Classes?
Report Question
0%
Extern
0%
Extend
0%
Extnd
0%
extends
What object type handles Java's layouts?
Report Question
0%
Layout Manager
0%
Layout Scheduler
0%
Layout Operator
0%
Layout Director
Which of the following layouts would be good to use for GUI that resembles a computer keyboard?
Report Question
0%
Flow Layout
0%
Border Layout
0%
Grid Layout
0%
Null Layout
If more than one class implements an interface, its methods are ____.
Report Question
0%
aggregated
0%
public
0%
dependent
0%
polymorphic
When overloading a method, the method header ________ .
Report Question
0%
Must exactly match the header of the method you are overloading.
0%
Must have the same name, but differ in order, number, or type of parameters.
0%
Can differ in name, but must have the same number and order of parameters.
0%
Can be completely different from the method you are overloading, but must have @Override.
What is the parent class of All Exceptions in JAVA
Report Question
0%
Throw
0%
Exception
0%
Error
0%
Bug
try block may or may not contains catch blocks
Report Question
0%
True
0%
False
readLine() return / input which type of value by default?
Report Question
0%
int
0%
float
0%
String
0%
All of the given
parseInt() is used for?
Report Question
0%
Input int
0%
Convert String to int
0%
Convert int to String
0%
Input String
class Demo{class_body;main() function body;},By which name above program should be saved?
Report Question
0%
Demo.java
0%
Demo.class
0%
class.Demo
0%
java.Demo
Java was originally named:
Report Question
0%
Coffee
0%
Oak
0%
New C++
0%
Duke
The average salary of a Java developer in the USA?
Report Question
0%
$23,975
0%
$43,975
0%
$63,975
0%
$83,975
From where did Java get its name?
Report Question
0%
Coffee
0%
Book
0%
TV Programme
0%
Initials of the developers of Java
Is Android based on Java?
Report Question
0%
True
0%
False
When was Java released?
Report Question
0%
1975
0%
1985
0%
1995
0%
2005
0%
2015
Who invented Java?
Report Question
0%
James Gosling
0%
Sergey Brin
0%
Steve Jobs
0%
Bill Gates
0%
Tim Berners-Lee
What is the name of the Java mascot?
Report Question
0%
Duke
0%
Ronny
0%
Penguin
0%
James
0%
Jack
How many Java developers are there?
Report Question
0%
1 million
0%
5 million
0%
10 million
0%
20 million
What was Java originally designed for?
Report Question
0%
Interactive TV
0%
Internet
0%
Gaming
0%
Cars
Which company owns Java?
Report Question
0%
Oracle
0%
Microsoft
0%
Google
0%
Apple
0%
Intel
Which of the following methods is JOptionPane class creates a dialog displaying a message to the user?
Report Question
0%
showMessageDialog()
0%
play()
0%
stop()
0%
getItemSelctable()
Which of the following is/are showMessageDialoge()?I. showInputDialog()II.play()III. showComfirmationDialoge()
Report Question
0%
I only
0%
II only
0%
III only
0%
I and III
0%
II and III
Which of the following methods can be used to start Audio playback?
Report Question
0%
play()
0%
stop()
0%
loop()
0%
addActionlistener()
Which of the following is the correct code to insert a statement to play the audio file when the "Play" button gets clicked in Java?
Report Question
0%
if (event.getSource()== playBtn) audio.play() ;
0%
if (event.getSource() == stopBtn) audio.stop();
0%
if (event.getSource() == repeatBtn) audio.loop();
0%
if (event.getSource() == playBtn) play();
Which of the following is the correct code to create JTextField?
Report Question
0%
JTextField field = new JTextField( 38 );
0%
Button btn1 = new JButton("Request Decision");
0%
new JTextField( 38 ) = JTextField field
0%
JFieldText field = new JFieldText( 38 );
Who invented Java?
Report Question
0%
James Gosling
0%
Sergey Brin
0%
Steve Jobs
0%
Bill Gates
0%
Tim Berners-Lee
Which type of data is used to enter the value (1234.5)?
Report Question
0%
Integer
0%
Double
0%
Char
0%
Void
Which type of data is used to enter the value (True)?
Report Question
0%
Float
0%
Boolean
0%
Check box
0%
ٍString
When we want to print in Java, we use the code ......
Report Question
0%
system.out.print();
0%
System.out.println();
0%
System.Out.Printf();
0%
System.out.show();
A variable that holds a whole number
Report Question
0%
String
0%
boolean
0%
int
0%
float
A variable that holds words
Report Question
0%
String
0%
boolean
0%
int
0%
float
A variable that holds a character
Report Question
0%
String
0%
boolean
0%
int
0%
char
0:0:1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
0
Answered
0
Not Answered
0
Not Visited
Correct : 0
Incorrect : 0
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqexams.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page