Search Assignments and Papers Here...


Custom Search

Wednesday, August 6, 2008

Java Programming - 12

LIST OF ATTEMPTED QUESTIONS AND ANSWERS

Select The Blank
Question: The most commonly used ________eger type is int.
Correct Answer: int
Your Answer: int

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: The easiest way to create a thread is to create a class that implements which interface?
Correct Answer: Runnable
Your Answer: Runnable

Multiple Choice Single Answer
Question: What are the possible access modifiers while implementing interface methods?
Correct Answer: public
Your Answer: public

Multiple Choice Single Answer
Question: Which statement is used inside the switch to terminate a statement sequence?
Correct Answer: Break
Your Answer: Break

Multiple Choice Single Answer
Question: Which statement is used to explicitly return from a method?
Correct Answer: Return
Your Answer: Return

Select The Blank
Question: ________ is probably the least used java data type
Correct Answer: short
Your Answer: short

Select The Blank
Question: Java defines ________ Primitive type of data.
Correct Answer: Eight
Your Answer: Eight

True/False
Question: The switch statement does not require a break.
Correct Answer: False
Your Answer: False

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

Select The Blank
Question: The ________ keyword halts the execution of the current loop and forces control out of the loop.
Correct Answer: Break
Your Answer: Break

True/False
Question: At any time, a thread can be terminated.
Correct Answer: True
Your Answer: True

Select The Blank
Question: Anonymous classes be implemented in an ________.
Correct Answer: Interface
Your Answer: Function

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 require web server for their operation , Require java enabled web browser , They are intelligent programs.

True/False
Question: When you write finalize() method for your class, you are overriding a finalizer inherited from a super class.
Correct Answer: True
Your Answer: True

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: The Bitwise Logical Operators are :-
Correct Answer: ^ , ^= , <<
Your Answer: ^ , ^= , <<

True/False
Question: Boolean values can be cast into any other primitive type.
Correct Answer: False
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 Single Answer
Question: The argument to which specifies the delayperiod in milliseconds
Correct Answer: sleep( )
Your Answer: sleep( )

Select The Blank
Question: ________can be extended.
Correct Answer: Interface
Your Answer: Class

Multiple Choice Multiple Answer
Question: Which are the java's control statements?
Correct Answer: For , If , Switch
Your Answer: If , Switch , Continue , For

True/False
Question: There is no Global Variable in Java.
Correct Answer: True
Your Answer: True

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( )

Match The Following
Question Correct Answer Your Answer
The Operators used in mathematical Arithmetic Operator Arithmetic Operator
Order in which operators are evaluated Order of precedence Order of precedence
Whether an expression is evaluated Associativity Associativity
left-to-right or right-to-left.
Java operator syntax for right (= operator;) (= operator;)
associativity

Multiple Choice Single Answer
Question: Which Control Statements enable program execution to repeat one or more statements?
Correct Answer: Iteration
Your Answer: Iteration

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; , byte b = 128; , double d = 1.4;

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

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: 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 , Iteration -- for loop, while loop and do-while loop

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 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

Multiple Choice Multiple Answer
Question: What are the Logical operators?
Correct Answer: OR() , AND(&) , XOR(^)
Your Answer: OR() , AND(&) , XOR(^)

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: float f = 2.3; , double d = 2.3; , int I = '1';

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: We can contruct a thread on any object that implements ________.
Correct Answer: Runnable
Your Answer: Runnable

True/False
Question: Java compiler stores the .class files in the path specified in CLASSPATH environmental variable.
Correct Answer: False
Your Answer: True

True/False
Question: User-defined package can also be imported just like the standard packages.
Correct Answer: True
Your Answer: False

Multiple Choice Multiple Answer
Question: Which of the following are mathematical Expressions?
Correct Answer: (+ +) , (+ =) , (- =)
Your Answer: (+ +) , (+ =) , (- =)

Match The Following
Question Correct Answer Your Answer
The data, or variable, defined within Instance variable. Instance variable.
General form of Cast (target--type)value (target--type)value
Determine the relationship that one Relational Operator Relational Operator
operand has to the other
The secondary versions of the Boolean Logical Operators Logical Operator
AND and OR operators Short-Circuit

True/False
Question: A thread can be preempted by a higher priority thread.
Correct Answer: True
Your Answer: True

Select The Blank
Question: Java virtual machine works as ________ for the the bytecode.
Correct Answer: Interpreter
Your Answer: Interpreter

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

Multiple Choice Multiple Answer
Question: Which statements can be used with the java's loop?
Correct Answer: Jump , Continue , Break
Your Answer: Continue , Break , Not

True/False
Question: With java Type Casts are checked at both compile-time and runtime.
Correct Answer: True
Your Answer: True

Multiple Choice Single Answer
Question: What are the kinds of variables in Java?
Correct Answer: Instance, local, class variables
Your Answer: Instance, local, class variables

0 Comments:

An Appeal to SCDL students

Dear SCDL Student,

We at http://scdlpapers.blogspot.com tries to collect and spread the knowledge in terms of the solved papers and assignments which we are getting through SCDL Alumni.
Now we request you to help other students through mutual sharing. Please send your assignment questions/papers to "mindgrill@gmail.com" . We will publish them on this blog along with your name.
Your help can be boon for many students to clear their exams.

Best of Luck and waiting for your contributions.

Team @ MindGrill
 

Interview Preparation | Placement Papers