Wednesday, August 6, 2008

Java Programming - 11

LIST OF ATTEMPTED QUESTIONS AND ANSWERS

True/False
Question: Threads of equal priority must voluntarily yield control to their peers.
Correct Answer: True
Your Answer: True

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

Multiple Choice Single Answer
Question: What can be created by instantiating an object type thread?
Correct Answer: Thread
Your Answer: Method

Select The Blank
Question: ________method starts a threrad by calling its run method.
Correct Answer: start( )
Your Answer: start( )

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: Multiple Choice Single Response
Correct Answer: Object oriented programming.
Your Answer: Object oriented programming.

Select The Blank
Question: The name of the new thread is specified by ________.
Correct Answer: threadName
Your Answer: Newthread

Multiple Choice Multiple Answer
Question: Java Operators can be divided into these groups :-
Correct Answer: Arithmetic , Bitwise , Relational
Your Answer: Arithmetic , Bitwise , Relational

Multiple Choice Single Answer
Question: Which keyword is used to create an instance of a class?
Correct Answer: new
Your Answer: new method

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

Multiple Choice Single Answer
Question: Java was developed at :-
Correct Answer: Sun Microsystems
Your Answer: Sun Microsystems

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

Select The Blank
Question: There are ________ kinds of Floating point type
Correct Answer: Two
Your Answer: Two

Multiple Choice Multiple Answer
Question: Classes usually consist of two things such as :-
Correct Answer: Instance variable , Methods
Your Answer: Instance variable , Objects

Multiple Choice Multiple Answer
Question: The Bitwise Logical Operators are :-
Correct Answer: ^ , ^= , <<
Your Answer: & , ^

Match The Following
Question Correct Answer Your Answer
It can have only one of two Boolean type Boolean type
possible values
Float hightemp, lowtemp Float variable declarations Float variable declarations
Smallest int type Byte Byte
Floating point numbers are Real Numbers Real Numbers
also known as

Select The Blank
Question: A ________ is a subclass of itself.
Correct Answer: Class
Your Answer: Instance

Select The Blank
Question: In ________ statement the value of the expression is compared with each of the literal values in case statements.
Correct Answer: Switch
Your Answer: Switch

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

Select The Blank
Question: The ________ loop is java's most fundamental looping statement.
Correct Answer: While
Your Answer: While

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

Select The Blank
Question: In ________ statement condition is true, then statement 1 is executed.
Correct Answer: If
Your Answer: If

Multiple Choice Single Answer
Question: Which statement will always execute the body of a loop at least once?
Correct Answer: Do
Your Answer: Do

Multiple Choice Multiple Answer
Question: Which thread is created automatically when the program is started?
Correct Answer: Main thread
Your Answer: Main thread , Current thread , First thread

Multiple Choice Multiple Answer
Question: Which is a public static member of thread?
Correct Answer: currenthread( ) , mainthread( )
Your Answer: currenthread( ) , Staticthread( ) , runthread( )

Multiple Choice Multiple Answer
Question: The Stack performs which two function?
Correct Answer: pop( ) , push( )
Your Answer: push( ) , first

Multiple Choice Multiple Answer
Question: What returns a reference to the thread in which it is called?
Correct Answer: Method , Class , Object
Your Answer: Method , Object , Try

True/False
Question: Is it necessary to implement all the methods of an interface while implementing the interface
Correct Answer: False
Your Answer: False

Multiple Choice Multiple Answer
Question: Modulus operator % can be applied to these data types :-
Correct Answer: floating Point , Integer , Character
Your Answer: floating Point , Character , Boolean

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

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: By default, all program import the java.lang package.
Correct Answer: True
Your Answer: True

Multiple Choice Single Answer
Question: Which Control Statements allow the program to choose different paths of execution?
Correct Answer: Selection
Your Answer: Break

True/False
Question: A thread can voluntarily relinquish control.
Correct Answer: False
Your Answer: False

Select The Blank
Question: ________ statement in java is conditional branch statement.
Correct Answer: If
Your Answer: Switch

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

Multiple Choice Single Answer
Question: Which statement used inside a set of nested loops, will only break out of the innermost loop?
Correct Answer: Break
Your Answer: Break

True/False
Question: When an object is referenced, it mean that it has been identified by the finalizer method for garbage collection.
Correct Answer: False
Your Answer: False

Multiple Choice Single Answer
Question: Which cast must be used to cast an object to another class?
Correct Answer: Specific cast.
Your Answer: simplific cast

True/False
Question: Byte can be Cast to Double Value.
Correct Answer: True
Your Answer: False

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: Selection -- if and switch statements , Iteration -- for loop, while loop and do-while loop , Loop

Multiple Choice Single Answer
Question: When can a constructor be called without specifying arguments?
Correct Answer: When there are no constructors for the class
Your Answer: When the name of the constructor differs from that of the class

True/False
Question: Variable in an interface are implicitly final and static.
Correct Answer: True
Your Answer: True

True/False
Question: Boolean data type have only Yes or No value.
Correct Answer: True
Your Answer: True

Multiple Choice Multiple Answer
Question: Which are the two threads of java?
Correct Answer: mainthread( ) , childthread( )
Your Answer: mainthread( ) , childthread( )

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 , Packages , Variables

Multiple Choice Single Answer
Question: Which method is used to determine the class of an object?
Correct Answer: getClass( ) method
Your Answer: getClass( ) method

No comments:

Search Assignments and Papers Here...


Custom Search

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