LIST OF ATTEMPTED QUESTIONS AND ANSWERS
Select The Blank
Question
The ________ loop repeats a set of statements a certain number of times until a condition is matched.
Correct Answer
For
Your Answer
For
Select The Blank
Question
In ________ statement condition is true, then statement 1 is executed.
Correct Answer
If
Your Answer
If
Multiple Choice Multiple Answer
Question
What are the Logical operators?
Correct Answer
OR() , AND(&) , XOR(^)
Your Answer
OR() , AND(&) , XOR(^)
Multiple Choice Single Answer
Question
Which operator is used to create and concatenate string?
Correct Answer
Addition operator(+).
Your Answer
Addition operator(+).
Multiple Choice Single Answer
Question
If omit the package statement, which names are put into defualt pacakge?
Correct Answer
class
Your Answer
class
Multiple Choice Multiple Answer
Question
Exit statement is optional in which loops in java?
Correct Answer
While , Do-while , For
Your Answer
For
Multiple Choice Multiple Answer
Question
Classes usually consist of two things such as :-
Correct Answer
Instance variable , Methods
Your Answer
Instance variable , Methods
True/False
Question
In Interface we need not use the keyword abstract for the methods.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
What modifiers may be used with top-level class?
Correct Answer
Public , Abstract , Final
Your Answer
Public , Abstract , Final
Multiple Choice Multiple Answer
Question
Which statements can be used with the java's loop?
Correct Answer
Jump , Continue , Break
Your Answer
Continue , Break
Multiple Choice Single Answer
Question
What is an array?
Correct Answer
It is value collection of same type of data type
Your Answer
It is value collection of same type of data type
True/False
Question
The switch statement does not require a break.
Correct Answer
False
Your Answer
False
True/False
Question
The for statement loop can be infinite.
Correct Answer
True
Your Answer
False
Multiple Choice Single Answer
Question
Which class can be extended?
Correct Answer
threadclass
Your Answer
threadclass
Select The Blank
Question
________ variables are declared by use of the Byte Keyword.
Correct Answer
Byte
Your Answer
Byte
Multiple Choice Multiple Answer
Question
Which are the two threads of java?
Correct Answer
mainthread( ) , childthread( )
Your Answer
current , new
Select The Blank
Question
The mechanism by which java frees the memory occupied by unused objects is ________.
Correct Answer
Garbage Collection
Your Answer
Garbage Collection
Match The Following
Question
Correct Answer
Your Answer
For statement
Initialization, condition, iteration
Initialization, condition, iteration
Multi way branch statement
Switch statement
Switch statement
To terminate the statement
Break
Break
Iteration statement
Do while
Iteration
Multiple Choice Single Answer
Question
Which statement checks at the beginning of a loop to see whether the next loop iteration should occur?
Correct Answer
While
Your Answer
While
Select The Blank
Question
The Process by which one object acquires properties of another object is ________.
Correct Answer
Inheritence
Your Answer
Inheritence
Multiple Choice Single Answer
Question
Which Control Statement allow the program to execute in a non-linear fashion?
Correct Answer
Jump
Your Answer
Iteration
Multiple Choice Multiple Answer
Question
Main thread is important for which two reasons?
Correct Answer
It is thread from which other "child" thread will be swapped , Often it must be the last thread to finish execution because It performs various shutdown actions
Your Answer
It is thread from which other "child" thread will be swapped , Often it must be the last thread to finish execution because It performs various shutdown actions
True/False
Question
Casting between primitive types allows conversion of one primitive type to another.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Method definition has four parts, they are :-
Correct Answer
Name of the method , Type of object , List of parameters
Your Answer
Name of the method , Type of object , List of parameters
Multiple Choice Single Answer
Question
Which statement defines a name space in which classes are stored?
Correct Answer
package
Your Answer
package
True/False
Question
Variable in an interface are implicitly final and static.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
When might your program wish to run the garbage collector?
Correct Answer
When it knows there will be some idle time , Before it enters a compute-intense section of code , Before it enters a memory-intense section of code
Your Answer
Before it enters a memory-intense section of code , When it knows there will be some idle time
Multiple Choice Single Answer
Question
How to change the values of the elements of the array?
Correct Answer
By using array subscript expression
Your Answer
By specifying index number
Multiple Choice Single Answer
Question
Which of the following is used to get the value of the instance variables?
Correct Answer
Dot Notation
Your Answer
Dot Notation
True/False
Question
Integer can Cast to byte value.
Correct Answer
False
Your Answer
True
Select The Blank
Question
________ is an instance of the class.
Correct Answer
Object
Your Answer
Object
Match The Following
Question
Correct Answer
Your Answer
Subclass of the Exception
RuntimeException
Throwable
Access modifier
Public
Public
Variable in inetrface
Static type
Static type
Handle exceptions
Throws class
RuntimeException
True/False
Question
Casting occurs commonly between numeric types
Correct Answer
True
Your Answer
False
True/False
Question
If the break statement is omited in switch statement, then execution will continue on into the next case.
Correct Answer
True
Your Answer
False
Select The Blank
Question
Multiple inheritance in Java can be achieve by ________.
Correct Answer
Interface
Your Answer
Interface
Multiple Choice Single Answer
Question
Java Applets are intelligent programs means :-
Correct Answer
They can react to user input and dynamically change.
Your Answer
They can react to user input and dynamically change.
True/False
Question
Constructors can be overloaded like regular methods.
Correct Answer
True
Your Answer
True
Multiple Choice Single Answer
Question
What are members of the threads class?
Correct Answer
Method
Your Answer
Method
Multiple Choice Single Answer
Question
How do you assign values to variables?
Correct Answer
By using the assignment operator =.
Your Answer
By using the assignment operator =.
Multiple Choice Multiple Answer
Question
Java's multithreading system is built upon :-
Correct Answer
Thread class , Its methods , Companion interface
Your Answer
Thread class , Companion interface , Method
True/False
Question
As abstract class must have at least one abstract method and others may be concrete or abstract.
Correct Answer
True
Your Answer
True
Select The Blank
Question
The mechanism which binds together the code and data and keeps both safe is ________.
Correct Answer
Encapsulation
Your Answer
Encapsulation
Select The Blank
Question
After the new thread is created, it will not start running until you call its ________method.
Correct Answer
start( )
Your Answer
start( )
Select The Blank
Question
Anything declared ________ can be accessed from anywhere within program.
Correct Answer
Public
Your Answer
Private
Multiple Choice Multiple Answer
Question
Within what Java provides many levels of protection to allow control over the visiblity of variables and methods?
Correct Answer
Classes , Subclasses , Packages
Your Answer
Classes , Subclasses , Packages
Select The Blank
Question
Double data type uses ________ to store a value
Correct Answer
64 bits
Your Answer
32 bits
Multiple Choice Multiple Answer
Question
What are different data types in java?
Correct Answer
char , double , byte
Your Answer
double , byte
Showing posts with label Java Programming (Set II). Show all posts
Showing posts with label Java Programming (Set II). Show all posts
Wednesday, August 6, 2008
Wednesday, July 16, 2008
Java Programming - 5
LIST OF ATTEMPTED QUESTIONS AND ANSWERS
Match The Following
Question
Correct Answer
Your Answer
Constructor
Initialization object
Protected
Parameters
Method Generalized
Method Generalized
Memory deallocation
Garbage Collection
Garbage Collection
This
Current Object
Current Object
Select The Blank
Question
The ________ statement defines a name space in which classes are stored
Correct Answer
Packages
Your Answer
Packages
Multiple Choice Single Answer
Question
The argument to which specifies the delayperiod in milliseconds
Correct Answer
sleep( )
Your Answer
wait( )
Multiple Choice Multiple Answer
Question
By Providing the interface keyword, Java allows you to fully utilize the which aspect of polymorphism?
Correct Answer
One interface , Multiple methods
Your Answer
One interface , Multiple methods , Derived
Match The Following
Question
Correct Answer
Your Answer
Exit any loop
Break
Exit
If
Else
Else
Loop
While
While
Jump
Break, continue, return
Goto
True/False
Question
A thread can be preempted by a higher priority thread.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Which of these lines of code will compile?
Correct Answer
short s = 20; , char c = 32; , double d = 1.4;
Your Answer
short s = 20; , char c = 32; , double d = 1.4;
Multiple Choice Single Answer
Question
How to declare an interface example?
Correct Answer
access class classname implements interface.
Your Answer
access interface name
Multiple Choice Single Answer
Question
Which statement has a the effect of "jumping out" of the switch statement?
Correct Answer
Break
Your Answer
Break
True/False
Question
There is no Global Variable in Java.
Correct Answer
True
Your Answer
False
Multiple Choice Single Answer
Question
Which method is used to determine the class of an object?
Correct Answer
getClass( ) method
Your Answer
getClass( ) method
Multiple Choice Multiple Answer
Question
Which are keywords in Java?
Correct Answer
Extends , Synchronized , Sizeof
Your Answer
Extends , Synchronized , Sizeof
True/False
Question
Each class in java can have a finalizer method.
Correct Answer
True
Your Answer
False
Select The Blank
Question
The ________ is similar to break, except that instead of halting the execution of the loop, it starts the next iteration.
Correct Answer
Continue
Your Answer
Continue
Multiple Choice Multiple Answer
Question
What are the programming constructs?
Correct Answer
Sequential , Selection -- if and switch statements , Iteration -- for loop, while loop and do-while loop
Your Answer
Sequential , Selection -- if and switch statements , Loop
Select The Blank
Question
Java defines ________ integer type.
Correct Answer
Four
Your Answer
Five
Multiple Choice Single Answer
Question
A Java application can execute anywhere on the network, this implements that Java is :-
Correct Answer
Architecture neutral
Your Answer
Distributed
Multiple Choice Single Answer
Question
How is it possible to use few methods of an interface in a class?
Correct Answer
By declaring the class as abstract
Your Answer
By declaring the class public
Multiple Choice Multiple Answer
Question
Which of the following are mathematical Expressions?
Correct Answer
(+ +) , (+ =) , (- =)
Your Answer
(+ +) , (+ =) , (- =)
Select The Blank
Question
________method starts a threrad by calling its run method.
Correct Answer
start( )
Your Answer
start( )
Multiple Choice Single Answer
Question
Syntax to declare a variable in java is :-
Correct Answer
type identifier [=value][,identifier[=value]…]
Your Answer
type identifier [=value][,identifier[=value]…]
Multiple Choice Multiple Answer
Question
Which of the following is the declaration of an array of string objects?
Correct Answer
String[ ] s; , String [ ]s: , String[ s]:
Your Answer
String[ ] s; , String s[ ]:
True/False
Question
A thread can voluntarily relinquish control.
Correct Answer
False
Your Answer
True
Multiple Choice Single Answer
Question
Which statement is used to explicitly return from a method?
Correct Answer
Return
Your Answer
Return
Multiple Choice Multiple Answer
Question
Expression must be of the data types :-
Correct Answer
Byte , Short , Int
Your Answer
Short , Int , Boolean
Multiple Choice Single Answer
Question
What is meant by garbage collection?
Correct Answer
Object is no longer referred to by any variable
Your Answer
Object is no longer referred to by any variable
Select The Blank
Question
There are ________ kinds of Floating point type
Correct Answer
Two
Your Answer
Three
Select The Blank
Question
________ method suspends a thread for some period of time.
Correct Answer
sleep( )
Your Answer
sleep( )
True/False
Question
Running threads can be suspended, which temporarily suspends its activity.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Packages act as containers for :-
Correct Answer
Classes , Subordinate packages
Your Answer
Classes , Classes , Subclasses
Select The Blank
Question
Long makes it useful when big ________ numbers are needed.
Correct Answer
Whole
Your Answer
Prime
Select The Blank
Question
The explicit drop of an object reference by setting the value of a variable, whose data type is a reference type of ________.
Correct Answer
Null
Your Answer
Null
Multiple Choice Multiple Answer
Question
What all the run( ) method can do?
Correct Answer
Can call other method , Declare variable
Your Answer
Declare variable , Create object , Create class
True/False
Question
Java assigns to each thread a priority that determines how that thread should be treated with respect to the others.
Correct Answer
True
Your Answer
True
True/False
Question
Java compiler stores the .class files in the path specified in CLASSPATH environmental variable.
Correct Answer
False
Your Answer
False
Multiple Choice Single Answer
Question
To import a class, what is a syntax used?
Correct Answer
import classname;
Your Answer
import classname;
Multiple Choice Multiple Answer
Question
Which are the java's control statements?
Correct Answer
For , If , Switch
Your Answer
For , If , Switch
Select The Blank
Question
________ loop repeats a statement or block while its controlling expressions is true.
Correct Answer
While
Your Answer
While
Multiple Choice Single Answer
Question
Java's which system allows a thread to enter a synhcronized method on an object, and then wait there until some other thread explicitly notifies it to come out :-
Correct Answer
Messaging
Your Answer
Run time
Multiple Choice Single Answer
Question
Java was developed at :-
Correct Answer
Sun Microsystems
Your Answer
Sun Microsystems
True/False
Question
Java allows loops to be nested.
Correct Answer
True
Your Answer
True
Select The Blank
Question
Java virtual machine works as ________ for the the bytecode.
Correct Answer
Interpreter
Your Answer
Compiler
Multiple Choice Single Answer
Question
When you implement an interface method, it must be declared as :-
Correct Answer
Public
Your Answer
Public
True/False
Question
Do while loop always executes its body at least once, because its conditional expression is at the bottom of the loop.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Which are the keywords use in switch statement?
Correct Answer
Case , Default
Your Answer
Case , Default , Jump
Multiple Choice Multiple Answer
Question
Which one does not extend java.lang.Number?
Correct Answer
Boolean , Character
Your Answer
Boolean , Character
Select The Blank
Question
After calling start( ) NewThread, constructor returns to ________.
Correct Answer
main( )
Your Answer
main( )
Match The Following
Question
Correct Answer
Your Answer
Constructor
Initialization object
Protected
Parameters
Method Generalized
Method Generalized
Memory deallocation
Garbage Collection
Garbage Collection
This
Current Object
Current Object
Select The Blank
Question
The ________ statement defines a name space in which classes are stored
Correct Answer
Packages
Your Answer
Packages
Multiple Choice Single Answer
Question
The argument to which specifies the delayperiod in milliseconds
Correct Answer
sleep( )
Your Answer
wait( )
Multiple Choice Multiple Answer
Question
By Providing the interface keyword, Java allows you to fully utilize the which aspect of polymorphism?
Correct Answer
One interface , Multiple methods
Your Answer
One interface , Multiple methods , Derived
Match The Following
Question
Correct Answer
Your Answer
Exit any loop
Break
Exit
If
Else
Else
Loop
While
While
Jump
Break, continue, return
Goto
True/False
Question
A thread can be preempted by a higher priority thread.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Which of these lines of code will compile?
Correct Answer
short s = 20; , char c = 32; , double d = 1.4;
Your Answer
short s = 20; , char c = 32; , double d = 1.4;
Multiple Choice Single Answer
Question
How to declare an interface example?
Correct Answer
access class classname implements interface.
Your Answer
access interface name
Multiple Choice Single Answer
Question
Which statement has a the effect of "jumping out" of the switch statement?
Correct Answer
Break
Your Answer
Break
True/False
Question
There is no Global Variable in Java.
Correct Answer
True
Your Answer
False
Multiple Choice Single Answer
Question
Which method is used to determine the class of an object?
Correct Answer
getClass( ) method
Your Answer
getClass( ) method
Multiple Choice Multiple Answer
Question
Which are keywords in Java?
Correct Answer
Extends , Synchronized , Sizeof
Your Answer
Extends , Synchronized , Sizeof
True/False
Question
Each class in java can have a finalizer method.
Correct Answer
True
Your Answer
False
Select The Blank
Question
The ________ is similar to break, except that instead of halting the execution of the loop, it starts the next iteration.
Correct Answer
Continue
Your Answer
Continue
Multiple Choice Multiple Answer
Question
What are the programming constructs?
Correct Answer
Sequential , Selection -- if and switch statements , Iteration -- for loop, while loop and do-while loop
Your Answer
Sequential , Selection -- if and switch statements , Loop
Select The Blank
Question
Java defines ________ integer type.
Correct Answer
Four
Your Answer
Five
Multiple Choice Single Answer
Question
A Java application can execute anywhere on the network, this implements that Java is :-
Correct Answer
Architecture neutral
Your Answer
Distributed
Multiple Choice Single Answer
Question
How is it possible to use few methods of an interface in a class?
Correct Answer
By declaring the class as abstract
Your Answer
By declaring the class public
Multiple Choice Multiple Answer
Question
Which of the following are mathematical Expressions?
Correct Answer
(+ +) , (+ =) , (- =)
Your Answer
(+ +) , (+ =) , (- =)
Select The Blank
Question
________method starts a threrad by calling its run method.
Correct Answer
start( )
Your Answer
start( )
Multiple Choice Single Answer
Question
Syntax to declare a variable in java is :-
Correct Answer
type identifier [=value][,identifier[=value]…]
Your Answer
type identifier [=value][,identifier[=value]…]
Multiple Choice Multiple Answer
Question
Which of the following is the declaration of an array of string objects?
Correct Answer
String[ ] s; , String [ ]s: , String[ s]:
Your Answer
String[ ] s; , String s[ ]:
True/False
Question
A thread can voluntarily relinquish control.
Correct Answer
False
Your Answer
True
Multiple Choice Single Answer
Question
Which statement is used to explicitly return from a method?
Correct Answer
Return
Your Answer
Return
Multiple Choice Multiple Answer
Question
Expression must be of the data types :-
Correct Answer
Byte , Short , Int
Your Answer
Short , Int , Boolean
Multiple Choice Single Answer
Question
What is meant by garbage collection?
Correct Answer
Object is no longer referred to by any variable
Your Answer
Object is no longer referred to by any variable
Select The Blank
Question
There are ________ kinds of Floating point type
Correct Answer
Two
Your Answer
Three
Select The Blank
Question
________ method suspends a thread for some period of time.
Correct Answer
sleep( )
Your Answer
sleep( )
True/False
Question
Running threads can be suspended, which temporarily suspends its activity.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Packages act as containers for :-
Correct Answer
Classes , Subordinate packages
Your Answer
Classes , Classes , Subclasses
Select The Blank
Question
Long makes it useful when big ________ numbers are needed.
Correct Answer
Whole
Your Answer
Prime
Select The Blank
Question
The explicit drop of an object reference by setting the value of a variable, whose data type is a reference type of ________.
Correct Answer
Null
Your Answer
Null
Multiple Choice Multiple Answer
Question
What all the run( ) method can do?
Correct Answer
Can call other method , Declare variable
Your Answer
Declare variable , Create object , Create class
True/False
Question
Java assigns to each thread a priority that determines how that thread should be treated with respect to the others.
Correct Answer
True
Your Answer
True
True/False
Question
Java compiler stores the .class files in the path specified in CLASSPATH environmental variable.
Correct Answer
False
Your Answer
False
Multiple Choice Single Answer
Question
To import a class, what is a syntax used?
Correct Answer
import classname;
Your Answer
import classname;
Multiple Choice Multiple Answer
Question
Which are the java's control statements?
Correct Answer
For , If , Switch
Your Answer
For , If , Switch
Select The Blank
Question
________ loop repeats a statement or block while its controlling expressions is true.
Correct Answer
While
Your Answer
While
Multiple Choice Single Answer
Question
Java's which system allows a thread to enter a synhcronized method on an object, and then wait there until some other thread explicitly notifies it to come out :-
Correct Answer
Messaging
Your Answer
Run time
Multiple Choice Single Answer
Question
Java was developed at :-
Correct Answer
Sun Microsystems
Your Answer
Sun Microsystems
True/False
Question
Java allows loops to be nested.
Correct Answer
True
Your Answer
True
Select The Blank
Question
Java virtual machine works as ________ for the the bytecode.
Correct Answer
Interpreter
Your Answer
Compiler
Multiple Choice Single Answer
Question
When you implement an interface method, it must be declared as :-
Correct Answer
Public
Your Answer
Public
True/False
Question
Do while loop always executes its body at least once, because its conditional expression is at the bottom of the loop.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Which are the keywords use in switch statement?
Correct Answer
Case , Default
Your Answer
Case , Default , Jump
Multiple Choice Multiple Answer
Question
Which one does not extend java.lang.Number?
Correct Answer
Boolean , Character
Your Answer
Boolean , Character
Select The Blank
Question
After calling start( ) NewThread, constructor returns to ________.
Correct Answer
main( )
Your Answer
main( )
Java Programming - 4
LIST OF ATTEMPTED QUESTIONS AND ANSWERS
True/False
Question
Constructors can be overloaded like regular methods.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
The Bitwise Logical Operators are :-
Correct Answer
^ , ^= , <<
Your Answer
^ , &
Multiple Choice Multiple Answer
Question
Which of the following are mathematical Expressions?
Correct Answer
(+ +) , (+ =) , (- =)
Your Answer
(+ +)
Select The Blank
Question
In ________ statement condition is true, then statement 1 is executed.
Correct Answer
If
Your Answer
If
Select The Blank
Question
Java defines ________ integer type.
Correct Answer
Four
Your Answer
Seven
Multiple Choice Multiple Answer
Question
Which of the following is the declaration of an array of string objects?
Correct Answer
String[ ] s; , String [ ]s: , String[ s]:
Your Answer
String[ s]:
Select The Blank
Question
The ________ statement defines a name space in which classes are stored
Correct Answer
Packages
Your Answer
Packages
Multiple Choice Single Answer
Question
Multiple Choice Single Response
Correct Answer
Object oriented programming.
Your Answer
Object oriented programming.
Multiple Choice Single Answer
Question
Select the facility provided along with JVM which enhances speed of execution :-
Correct Answer
Just-In-Time (JIT) compiler.
Your Answer
Fast interpreter.
True/False
Question
Range of char data type in java is 0 to 65,536.
Correct Answer
True
Your Answer
False
Multiple Choice Single Answer
Question
What is an array?
Correct Answer
It is value collection of same type of data type
Your Answer
It is value collection of same type of data type
Match The Following
Question
Correct Answer
Your Answer
It can have only one of two possible values
Boolean type
Boolean type
Float hightemp, lowtemp
Float variable declarations
Float variable declarations
Smallest int type
Byte
Real Numbers
Floating point numbers are also known as
Real Numbers
Not real number
True/False
Question
The for statement loop can be infinite.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Expression must be of the data types :-
Correct Answer
Byte , Short , Int
Your Answer
Byte , Int , Boolean
Multiple Choice Multiple Answer
Question
Features of Java applets are :-
Correct Answer
They can be transmitted over internet , Require java enabled web browser
Your Answer
They can be transmitted over internet , They require web server for their operation , Require java enabled web browser , They are intelligent programs.
Select The Blank
Question
Java virtual machine works as ________ for the the bytecode.
Correct Answer
Interpreter
Your Answer
Compiler
Multiple Choice Single Answer
Question
Which statement is used inside the switch to terminate a statement sequence?
Correct Answer
Break
Your Answer
Break
Select The Blank
Question
The default ________ of objects protects private and transient data.
Correct Answer
Encoding
Your Answer
Casting
Multiple Choice Multiple Answer
Question
What are different data types in java?
Correct Answer
char , double , byte
Your Answer
varchar , char , double , byte
Multiple Choice Single Answer
Question
How multidimensional array is declared?
Correct Answer
int[4] [5];
Your Answer
char[4,5]
Select The Blank
Question
The mechanism by which java frees the memory occupied by unused objects is ________.
Correct Answer
Garbage Collection
Your Answer
Garbage Collection
Multiple Choice Multiple Answer
Question
Which statements can be used with the java's loop?
Correct Answer
Jump , Continue , Break
Your Answer
Jump , Continue , Break
Multiple Choice Multiple Answer
Question
Java Operators can be divided into these groups :-
Correct Answer
Arithmetic , Bitwise , Relational
Your Answer
Arithmetic , Relational
Select The Blank
Question
Java defines ________ Primitive type of data.
Correct Answer
Eight
Your Answer
Eight
Select The Blank
Question
The mechanism which binds together the code and data and keeps both safe is ________.
Correct Answer
Encapsulation
Your Answer
Encapsulation
True/False
Question
Object oriented programming organizes a program around processes acting on data.
Correct Answer
False
Your Answer
True
Select The Blank
Question
________ variables are declared by use of the Byte Keyword.
Correct Answer
Byte
Your Answer
Byte
Multiple Choice Multiple Answer
Question
The Stack performs which two function?
Correct Answer
pop( ) , push( )
Your Answer
pop( ) , push( )
True/False
Question
Float data type is useful when we need fractional values.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Which of the following assignments are valid?
Correct Answer
short s = 28; , double d = 2.3; , int I = '1';
Your Answer
short s = 28; , float f = 2.3; , double d = 2.3;
Select The Blank
Question
The Process by which one object acquires properties of another object is ________.
Correct Answer
Inheritence
Your Answer
Inheritence
True/False
Question
As abstract class must have at least one abstract method and others may be concrete or abstract.
Correct Answer
True
Your Answer
True
True/False
Question
Java define eight simple types of data byte, short, int, long, char, float, double, boolean.
Correct Answer
True
Your Answer
True
Multiple Choice Single Answer
Question
When java program starts up, which thread begins running immediately?
Correct Answer
Main thread
Your Answer
Main thread
Multiple Choice Single Answer
Question
A Java application can execute anywhere on the network, this implements that Java is :-
Correct Answer
Architecture neutral
Your Answer
Architecture neutral
Multiple Choice Multiple Answer
Question
What are means of encapsulating and containing the name space and scope of variables and methods?
Correct Answer
Classes , Packages , Subclasses
Your Answer
Classes , Packages , Subclasses
Multiple Choice Multiple Answer
Question
What returns a reference to the thread in which it is called?
Correct Answer
Method , Class , Object
Your Answer
Class , Object
Multiple Choice Single Answer
Question
Java was developed at :-
Correct Answer
Sun Microsystems
Your Answer
Sun Microsystems
Multiple Choice Single Answer
Question
Which statement is used to explicitly return from a method?
Correct Answer
Return
Your Answer
Return
Multiple Choice Single Answer
Question
Java Applets are intelligent programs means :-
Correct Answer
They can react to user input and dynamically change.
Your Answer
They can react to user input and dynamically change.
Select The Blank
Question
A ________ is a subclass of itself.
Correct Answer
Class
Your Answer
Class
Multiple Choice Single Answer
Question
Which statement provides an easy way to dispatch execution to different parts of your code based on the value of an expression?
Correct Answer
Switch
Your Answer
Switch
Select The Blank
Question
The ________ loop is java's most fundamental looping statement.
Correct Answer
While
Your Answer
While
Select The Blank
Question
________ method suspends a thread for some period of time.
Correct Answer
sleep( )
Your Answer
sleep( )
Multiple Choice Multiple Answer
Question
Modulus operator % can be applied to these data types :-
Correct Answer
floating Point , Integer , Character
Your Answer
floating Point , Integer , Character
Select The Blank
Question
________ statement in java is conditional branch statement.
Correct Answer
If
Your Answer
If
True/False
Question
Constructors can be overloaded like regular methods.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
The Bitwise Logical Operators are :-
Correct Answer
^ , ^= , <<
Your Answer
^ , &
Multiple Choice Multiple Answer
Question
Which of the following are mathematical Expressions?
Correct Answer
(+ +) , (+ =) , (- =)
Your Answer
(+ +)
Select The Blank
Question
In ________ statement condition is true, then statement 1 is executed.
Correct Answer
If
Your Answer
If
Select The Blank
Question
Java defines ________ integer type.
Correct Answer
Four
Your Answer
Seven
Multiple Choice Multiple Answer
Question
Which of the following is the declaration of an array of string objects?
Correct Answer
String[ ] s; , String [ ]s: , String[ s]:
Your Answer
String[ s]:
Select The Blank
Question
The ________ statement defines a name space in which classes are stored
Correct Answer
Packages
Your Answer
Packages
Multiple Choice Single Answer
Question
Multiple Choice Single Response
Correct Answer
Object oriented programming.
Your Answer
Object oriented programming.
Multiple Choice Single Answer
Question
Select the facility provided along with JVM which enhances speed of execution :-
Correct Answer
Just-In-Time (JIT) compiler.
Your Answer
Fast interpreter.
True/False
Question
Range of char data type in java is 0 to 65,536.
Correct Answer
True
Your Answer
False
Multiple Choice Single Answer
Question
What is an array?
Correct Answer
It is value collection of same type of data type
Your Answer
It is value collection of same type of data type
Match The Following
Question
Correct Answer
Your Answer
It can have only one of two possible values
Boolean type
Boolean type
Float hightemp, lowtemp
Float variable declarations
Float variable declarations
Smallest int type
Byte
Real Numbers
Floating point numbers are also known as
Real Numbers
Not real number
True/False
Question
The for statement loop can be infinite.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Expression must be of the data types :-
Correct Answer
Byte , Short , Int
Your Answer
Byte , Int , Boolean
Multiple Choice Multiple Answer
Question
Features of Java applets are :-
Correct Answer
They can be transmitted over internet , Require java enabled web browser
Your Answer
They can be transmitted over internet , They require web server for their operation , Require java enabled web browser , They are intelligent programs.
Select The Blank
Question
Java virtual machine works as ________ for the the bytecode.
Correct Answer
Interpreter
Your Answer
Compiler
Multiple Choice Single Answer
Question
Which statement is used inside the switch to terminate a statement sequence?
Correct Answer
Break
Your Answer
Break
Select The Blank
Question
The default ________ of objects protects private and transient data.
Correct Answer
Encoding
Your Answer
Casting
Multiple Choice Multiple Answer
Question
What are different data types in java?
Correct Answer
char , double , byte
Your Answer
varchar , char , double , byte
Multiple Choice Single Answer
Question
How multidimensional array is declared?
Correct Answer
int[4] [5];
Your Answer
char[4,5]
Select The Blank
Question
The mechanism by which java frees the memory occupied by unused objects is ________.
Correct Answer
Garbage Collection
Your Answer
Garbage Collection
Multiple Choice Multiple Answer
Question
Which statements can be used with the java's loop?
Correct Answer
Jump , Continue , Break
Your Answer
Jump , Continue , Break
Multiple Choice Multiple Answer
Question
Java Operators can be divided into these groups :-
Correct Answer
Arithmetic , Bitwise , Relational
Your Answer
Arithmetic , Relational
Select The Blank
Question
Java defines ________ Primitive type of data.
Correct Answer
Eight
Your Answer
Eight
Select The Blank
Question
The mechanism which binds together the code and data and keeps both safe is ________.
Correct Answer
Encapsulation
Your Answer
Encapsulation
True/False
Question
Object oriented programming organizes a program around processes acting on data.
Correct Answer
False
Your Answer
True
Select The Blank
Question
________ variables are declared by use of the Byte Keyword.
Correct Answer
Byte
Your Answer
Byte
Multiple Choice Multiple Answer
Question
The Stack performs which two function?
Correct Answer
pop( ) , push( )
Your Answer
pop( ) , push( )
True/False
Question
Float data type is useful when we need fractional values.
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Which of the following assignments are valid?
Correct Answer
short s = 28; , double d = 2.3; , int I = '1';
Your Answer
short s = 28; , float f = 2.3; , double d = 2.3;
Select The Blank
Question
The Process by which one object acquires properties of another object is ________.
Correct Answer
Inheritence
Your Answer
Inheritence
True/False
Question
As abstract class must have at least one abstract method and others may be concrete or abstract.
Correct Answer
True
Your Answer
True
True/False
Question
Java define eight simple types of data byte, short, int, long, char, float, double, boolean.
Correct Answer
True
Your Answer
True
Multiple Choice Single Answer
Question
When java program starts up, which thread begins running immediately?
Correct Answer
Main thread
Your Answer
Main thread
Multiple Choice Single Answer
Question
A Java application can execute anywhere on the network, this implements that Java is :-
Correct Answer
Architecture neutral
Your Answer
Architecture neutral
Multiple Choice Multiple Answer
Question
What are means of encapsulating and containing the name space and scope of variables and methods?
Correct Answer
Classes , Packages , Subclasses
Your Answer
Classes , Packages , Subclasses
Multiple Choice Multiple Answer
Question
What returns a reference to the thread in which it is called?
Correct Answer
Method , Class , Object
Your Answer
Class , Object
Multiple Choice Single Answer
Question
Java was developed at :-
Correct Answer
Sun Microsystems
Your Answer
Sun Microsystems
Multiple Choice Single Answer
Question
Which statement is used to explicitly return from a method?
Correct Answer
Return
Your Answer
Return
Multiple Choice Single Answer
Question
Java Applets are intelligent programs means :-
Correct Answer
They can react to user input and dynamically change.
Your Answer
They can react to user input and dynamically change.
Select The Blank
Question
A ________ is a subclass of itself.
Correct Answer
Class
Your Answer
Class
Multiple Choice Single Answer
Question
Which statement provides an easy way to dispatch execution to different parts of your code based on the value of an expression?
Correct Answer
Switch
Your Answer
Switch
Select The Blank
Question
The ________ loop is java's most fundamental looping statement.
Correct Answer
While
Your Answer
While
Select The Blank
Question
________ method suspends a thread for some period of time.
Correct Answer
sleep( )
Your Answer
sleep( )
Multiple Choice Multiple Answer
Question
Modulus operator % can be applied to these data types :-
Correct Answer
floating Point , Integer , Character
Your Answer
floating Point , Integer , Character
Select The Blank
Question
________ statement in java is conditional branch statement.
Correct Answer
If
Your Answer
If
Subscribe to:
Posts (Atom)