_________ operator returns the remainder after division
  • +
  • /
  • %
  • *
________ operator is used to check the equality of two values
  • >=
  • =
  • *=
  • ==
Bit wise operations only carried out only in integer /long integer values.
  • True
  • False
Operator used to access the members of a class /package
  • (.) Dot
  • (,) Comma
Java has goto statement
  • True
  • False
Java doesn't support structures and unions
  • True
  • False
Java is
  • platform dependent
  • platform indeprndent
In Java WORA stands for
  • Write Once Recall Anywhere
  • Write Once Return Anywhere
  • Write Once Read Anywhere
  • Write Once Run Anywhere
JVM stands for
  • Java Vital Machine
  • Java Virtual Machine
  • Java Vendor machine
Java programs ________________
  • are only compiled
  • are only compiled not interpreted
  • are only interpreted
  • are both compiled and interpreted
In Java, execution starts from ___________ function.
  • get()
  • main()
  • java()
  • display()
Main() method is not mandatory for a Java program
  • True
  • False
Who developed Java?
  • James Gosling
  • Bjarne Stroustrup
  • Robert James
  • None
JVM is responsible for machine to be platform independent.
  • TRUE
  • FALSE
Choose most appropriate purpose of trim() method in String?
  • to remove white spaces
  • to get a substring of the string
  • to cut String at desired index
  • to remove extra white spaces from start and end of String
What is Programming?
  • A city in Kansas
  • Communicating using the computer
  • Using the computer to execute a program
  • None Of The Above
Which one of the following is correct ?
  • system.out.print
  • System.out.printl
  • System.Out.Print
  • System.out.print
a= 22 , b= 12 , c= a+b . What is c
  • 33
  • 35
  • 48
  • 34
a= 54 , b=39 , c= a-b . Find c.
  • 15
  • 17
  • 16
  • 14
The text inside the double quotes (including the double quotes) is
  • Double Quotes
  • String
  • Integer
  • Variable
This term we learnt to
  • Add,Subtract,Multiply,Divide
  • Subtract,Add
  • Add,Multiply
  • Add,Subtract,Multiply
Which type of data is used to enter the value ("Welcome")?
  • Text
  • Characters
  • String
  • Boolean
We are use Scanner Library in java for...
  • Give permissions to the user
  • Correcting software errors
  • Allows user to read data
  • Allows the user to enter data
Which of the following is NOT a data types in java
  • int
  • String
  • number
  • double
float myFloatNum = 5.99f;System.out.println(myFloatNum);What will be the output?
  • 5.99
  • 5.99f
  • "5.99"
  • "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?
  • 950
  • 800
  • sum2sum2
  • sum1250
What is the output of below code?int x = 5;System.out.println(x++);System.out.println(x);
  • 55
  • 66
  • 56
  • 65
String x = "10";String y = "20";String z = x + y;System.out.println(z);Guess the output.
  • 1020
  • 10 20
  • 30
  • "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.
  • True
  • False
Exception and Error are immediate subclasses of a class called
  • Object
  • Throwable
  • AWT
  • `Pane
The following Syntax is used for?class Subclass-name extends Superclass-name { //methods and fields },
  • Polymorphism
  • Encapsulation
  • Inheritance
  • None of the above
_______ Operator is used to create an object.
  • class
  • new
  • print
  • main
A class that is inherited is called a ______ .
  • superclass
  • Subclass
  • subsetclass
  • Relativeclass
True or False : Java is case sensitive, which means identifier Hello and hello would have different meaning in Java
  • True
  • False
Inheritance is used when the relationship between two classes is a(n) _______ relationship.
  • "HAS-A"
  • "PART-OF-A"
  • "IS-A"
  • inverse
What is the advantage of Exception Handling
  • To avoid abnormal termination of a program
  • To find out errors
  • To Debug program
  • None of these
How to create our own exception
  • using 'throw' keyword
  • using 'throws' keyword
  • using 'finally' keyword
  • using 'throwable' keyword
Which method is used to wait for child threads to finish in Java?
  • Wait ()
  • Sleep ()
  • Join ()
  • isAlive()
Thread priority in Java is?
  • Integer
  • Float
  • Double
  • 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?
  • 55
  • 30
  • 25
  • 35
What is a keyword used in extending Classes?
  • Extern
  • Extend
  • Extnd
  • extends
What object type handles Java's layouts?
  • Layout Manager
  • Layout Scheduler
  • Layout Operator
  • Layout Director
Which of the following layouts would be good to use for GUI that resembles a computer keyboard?
  • Flow Layout
  • Border Layout
  • Grid Layout
  • Null Layout
If more than one class implements an interface, its methods are ____.
  • aggregated
  • public
  • dependent
  • polymorphic
When overloading a method, the method header ________ .
  • Must exactly match the header of the method you are overloading.
  • Must have the same name, but differ in order, number, or type of parameters.
  • Can differ in name, but must have the same number and order of parameters.
  • Can be completely different from the method you are overloading, but must have @Override.
What is the parent class of All Exceptions in JAVA
  • Throw
  • Exception
  • Error
  • Bug
try block may or may not contains catch blocks
  • True
  • False
readLine() return / input which type of value by default?
  • int
  • float
  • String
  • All of the given
parseInt() is used for?
  • Input int
  • Convert String to int
  • Convert int to String
  • Input String
class Demo{class_body;main() function body;},By which name above program should be saved?
  • Demo.java
  • Demo.class
  • class.Demo
  • java.Demo
Java was originally named:
cs-2 sb-1-Javaimg_no 433.jpg
  • Coffee
  • Oak
  • New C++
  • Duke
The average salary of a Java developer in the USA?
  • $23,975
  • $43,975
  • $63,975
  • $83,975
From where did Java get its name?
  • Coffee
  • Book
  • TV Programme
  • Initials of the developers of Java
Is Android based on Java?
  • True
  • False
When was Java released?
  • 1975
  • 1985
  • 1995
  • 2005
  • 2015
Who invented Java?
cs-2 sb-1-Javaimg_no 434.jpg
  • James Gosling
  • Sergey Brin
  • Steve Jobs
  • Bill Gates
  • Tim Berners-Lee
What is the name of the Java mascot?
cs-2 sb-1-Javaimg_no 435.jpg
  • Duke
  • Ronny
  • Penguin
  • James
  • Jack
How many Java developers are there?
cs-2 sb-1-Javaimg_no 436.jpg
  • 1 million
  • 5 million
  • 10 million
  • 20 million
What was Java originally designed for?
cs-2 sb-1-Javaimg_no 437.jpg
  • Interactive TV
  • Internet
  • Gaming
  • Cars
Which company owns Java?
cs-2 sb-1-Javaimg_no 438.jpg
  • Oracle
  • Microsoft
  • Google
  • Apple
  • Intel
Which of the following methods is JOptionPane class creates a dialog displaying a message to the user?
  • showMessageDialog()
  • play()
  • stop()
  • getItemSelctable()
Which of the following is/are showMessageDialoge()?I. showInputDialog()II.play()III. showComfirmationDialoge()
  • I only
  • II only
  • III only
  • I and III
  • II and III
Which of the following methods can be used to start Audio playback?
  • play()
  • stop()
  • loop()
  • 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?
  • if (event.getSource()== playBtn) audio.play() ;
  • if (event.getSource() == stopBtn) audio.stop();
  • if (event.getSource() == repeatBtn) audio.loop();
  • if (event.getSource() == playBtn) play();
Which of the following is the correct code to create JTextField?
  • JTextField field = new JTextField( 38 );
  • Button btn1 = new JButton("Request Decision");
  • new JTextField( 38 ) = JTextField field
  • JFieldText field = new JFieldText( 38 );
Who invented Java?
cs-2 sb-1-Javaimg_no 766.jpg
  • James Gosling
  • Sergey Brin
  • Steve Jobs
  • Bill Gates
  • Tim Berners-Lee
Which type of data is used to enter the value (1234.5)?
  • Integer
  • Double 
  • Char
  • Void
Which type of data is used to enter the value (True)?
  • Float
  • Boolean
  • Check box
  • ٍString
When we want to print in Java, we use the code ......
  • system.out.print();
  • System.out.println();
  • System.Out.Printf();
  • System.out.show();
A variable that holds a whole number
  • String
  • boolean
  • int
  • float
A variable that holds words
  • String
  • boolean
  • int
  • float
A variable that holds a character
  • String
  • boolean
  • int
  • char
0:0:1



Answered

Not Answered

Not Visited
Correct : 0
Incorrect : 0