Search Assignments and Papers Here...


Custom Search

Wednesday, August 6, 2008

Java Programming - 16

LIST OF ATTEMPTED QUESTIONS AND ANSWERS

Select The Blank
Question: A ________can implement more than one interface.
Correct Answer: Class
Your Answer: Method

True/False
Question: Casting does not affect the original object or value.
Correct Answer: True
Your Answer: True

Multiple Choice Single Answer
Question: In multithreaded program each part of such program is called :-
Correct Answer: Thread
Your Answer: Thread

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

Select The Blank
Question: ________ loop repeats a statement or block while its controlling expressions is true.
Correct Answer: While
Your Answer: While

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

Match The Following
Question Correct Answer Your Answer
Interface Abtract method Abtract method
Pacakge declaration Package pkg Package pkg
Java.applet. AppletClass AppletClass
AppletJava.applet Java.applet package Java.applet package

True/False
Question: Transient variable is variable that may not be serialized.
Correct Answer: True
Your Answer: False

Select The Blank
Question: Java defines ________ integer type.
Correct Answer: Four
Your Answer: Four

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: Modulus operator % can be applied to these data types :-
Correct Answer: floating Point , Integer , Character
Your Answer: floating Point , Integer

Multiple Choice Multiple Answer
Question: Which are keywords in Java?
Correct Answer: Extends , Synchronized , Sizeof
Your Answer: Extends , Synchronized , Sizeof

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

Multiple Choice Single Answer
Question: The argument to which specifies the delayperiod in milliseconds
Correct Answer: sleep( )
Your Answer: sleep( )

Select The Blank
Question: Anything declared ________ can be accessed from anywhere within program.
Correct Answer: Public
Your Answer: Public

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 Multiple Answer
Question: There are two distinct types of multitasking. Which are those?
Correct Answer: Process based , Thread-base
Your Answer: Thread-base , Object

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

Multiple Choice Multiple Answer
Question: What all the run( ) method can do?
Correct Answer: Can call other method , Declare variable
Your Answer: Can call other method , Create object , Create class

Multiple Choice Single Answer
Question: What is a string?
Correct Answer: A combination of characters called as string
Your Answer: A combination of characters called as string

Multiple Choice Multiple Answer
Question: What are different modifiers?
Correct Answer: Private , Protected , Final
Your Answer: Private , Final , Main

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

Multiple Choice Single Answer
Question: Java uses which system to store packages?
Correct Answer: File system directories
Your Answer: File system directories

Multiple Choice Single Answer
Question: If omit the package statement, which names are put into defualt pacakge?
Correct Answer: class
Your Answer: method

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

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

Select The Blank
Question: After calling start( ) NewThread, constructor returns to ________.
Correct Answer: main( )
Your Answer: main( )

Select The Blank
Question: The default encoding of objects supports the ________ of the classes.
Correct Answer: Evolution
Your Answer: Encoding

True/False
Question: The Switch statement can have multiple cases without a break statements between them.
Correct Answer: True
Your Answer: True

Multiple Choice Single Answer
Question: What is a data structure that controls the state of a collection of threads as a whole?
Correct Answer: Thread group
Your Answer: Exceptions

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

Select The Blank
Question: A ________ is declared by use of the class keyword.
Correct Answer: class
Your Answer: class

True/False
Question: Running threads can be suspended, which temporarily suspends its activity.
Correct Answer: True
Your Answer: True

Multiple Choice Single Answer
Question: How to declare an interface example?
Correct Answer: access class classname implements interface.
Your Answer: access class classname implements interface.

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

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

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

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: ________ is an instance of a class that implements the runnable interface.
Correct Answer: threadOb
Your Answer: threadF

Select The Blank
Question: ________ variables are declared by use of the Byte Keyword.
Correct Answer: Byte
Your Answer: Byte

Multiple Choice Single Answer
Question: When you implement an interface method, it must be declared as :-
Correct Answer: Public
Your Answer: Public

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

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

Select The Blank
Question: The smallest integer type is ________.
Correct Answer: Byte
Your Answer: Byte

Multiple Choice Multiple Answer
Question: Which are the keywords use in switch statement?
Correct Answer: Case , Default
Your Answer: Case , Default , Exit

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