Search Assignments and Papers Here...


Custom Search

Wednesday, June 2, 2010

Java Programming - 25

LIST OF ATTEMPTED QUESTIONS AND ANSWERS

 

Multiple Choice Multiple Answer

Question Which are the two threads of java?

Correct Answer mainthread( ) , childthread( )

Your Answer mainthread( ) , childthread( )

 

Multiple Choice Single Answer

Question How can class be imported from a package to a program?

Correct Answer import java.packagename.classname

Your Answer import java.package.class

 

Multiple Choice Single Answer

Question Which keyword is used to create an instance of a class?

Correct Answer new

Your Answer new

 

Multiple Choice Single Answer

Question Multiple Choice Single Response

Correct Answer Object oriented programming.

Your Answer Object oriented programming.

 

Multiple Choice Single Answer

Question Which is the default access modifier for an interface method?

Correct Answer public

Your Answer public

 

Multiple Choice Single Answer

Question How multidimensional array is declared?

Correct Answer int[4] [5];

Your Answer int[4] [5];

 

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 , Class , Object

 

True/False

Question Casting occurs commonly between numeric types

Correct Answer True

Your Answer True

 

Select The Blank

Question Start( )executes a call to ________.

Correct Answer run( )

Your Answer run( )

 

True/False

Question Running threads can be suspended, which temporarily suspends its activity.

Correct Answer True

Your Answer True

 

Select The Blank

Question A ________ is a subclass of itself.

Correct Answer Class

Your Answer Class

 

Multiple Choice Single Answer

Question How many concrete classes can you have inside an interface?

Correct Answer none

Your Answer none

 

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.

 

Multiple Choice Single Answer

Question Which of the following can be referenced by 'this' variable?

Correct Answer The instance variables and methods of a class

Your Answer The instance variables of a class only

 

True/False

Question A thread's priority is used to decide when to switch from one running thread to the

next, this is called as the context switch.

Correct Answer True

Your Answer True

 

True/False

Question Object oriented programming organizes a program around processes acting on data.

Correct Answer False

Your Answer False

 

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;

 

Select The Blank

Question ________ are stored in hierarchical manner.

Correct Answer Packages

Your Answer Packages

 

Multiple Choice Multiple Answer

Question What are different data types in java?

Correct Answer char , double , byte

Your Answer char , double , byte

 

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 Just-In-Time (JIT) compiler.

 

Match The Following

Question Correct Answer Your Answer

The data, or variable, defined

within a class

Instance variable. Instance variable.

General form of Cast (target--type)value (target--type)value

Determine the relationship that

one operand has to the other

Relational Operator Relational Operator

The secondary versions of the

Boolean AND and OR operators

Short-Circuit Logical Operators Short-Circuit Logical Operators

 

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

 

Multiple Choice Multiple Answer

Question Expression must be of the data types :-

Correct Answer Byte , Short , Int

Your Answer Byte , Short , Int

 

Select The Blank

Question For externalizable objects the ________ is solely responsible for the external format

of its contents.

Correct Answer Class

Your Answer Class

 

Multiple Choice Single Answer

Question Using which keyword we can fully abstract a class?

Correct Answer interface

Your Answer interface

 

Select The Blank

Question The ________ repeat a set of code while the condition is false.

Correct Answer While loop

Your Answer While loop

 

Multiple Choice Multiple Answer

Question Which of the following are mathematical Expressions?

Correct Answer (+ +) , (+ =) , (- =)

Your Answer (+ +) , (+ =) , (- =)

 

Multiple Choice Single Answer

Question Which method is used to determine the class of an object?

Correct Answer getClass( ) method

Your Answer getClass( ) method

 

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 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 Java was developed at :-

Correct Answer Sun Microsystems

Your Answer Sun Microsystems

 

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

 

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

Question Java defines two ways when instantiating an object, such as :-

Correct Answer Can implement the runnable interface , Can extend the thread class

Your Answer Can implement the runnable interface , Can extend the thread class

 

Multiple Choice Multiple Answer

Question The source for the frist package defines three classes

Correct Answer Protection , Derived , SamePackage

Your Answer Protection , Derived , SamePackage

 

Multiple Choice Multiple Answer

Question Exit statement is optional in which loops in java?

Correct Answer While , Do-while , For

Your Answer While , Do-while , For

 

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 What are the possible access modifiers while implementing interface methods?

Correct Answer public

Your Answer public

 

Multiple Choice Multiple Answer

Question Which is a public static member of thread?

Correct Answer currenthread( ) , mainthread( )

Your Answer currenthread( ) , mainthread( )

 

Select The Blank

Question The ________ repeats a set of code at least once before the condition is tested.

Correct Answer Do-while loop

Your Answer Do-while loop

 

True/False

Question A thread can be blocked when waiting for a resource.

Correct Answer True

Your Answer True

 

Select The Blank

Question A ________can implement more than one interface.

Correct Answer Class

Your Answer Class

 

True/False

Question Boolean values can be cast into any other primitive type.

Correct Answer False

Your Answer False

 

True/False

Question Constructors can be overloaded like regular methods.

Correct Answer True

Your Answer True

 

Select The Blank

Question The name of the new thread is specified by ________.

Correct Answer threadName

Your Answer threadName

 

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

 

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 Byte

Floating point numbers are also

known as

Real Numbers Real Numbers

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