Wednesday, July 16, 2008

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

No comments:

Post a Comment