SCDL - Java Programming
SCDL - Java Programming
Page 1 of 68
SCDL – 4th Semester – Java Programming
True/False
Question When for loop start the execution, the initialization portion of the loop is executed.
Correct Answer They can react to user input and dynamically change.
Page 2 of 68
SCDL – 4th Semester – Java Programming
Page 3 of 68
SCDL – 4th Semester – Java Programming
Correct Answer If
Your Answer If
True/False
Question A thread can be blocked when waiting for a resource.
Page 4 of 68
SCDL – 4th Semester – Java Programming
Page 5 of 68
SCDL – 4th Semester – Java Programming
True/False
Question All the methods declared inside an Interface are abstract.
True/False
Question A suspended thread can then be resumed allowing it to pick up where it left off.
Page 6 of 68
SCDL – 4th Semester – Java Programming
Page 7 of 68
SCDL – 4th Semester – Java Programming
Question A Java application can execute anywhere on the network, this implements that Java is :-
Correct Answer They can react to user input and dynamically change.
Your Answer They can react to user input and dynamically change.
Page 8 of 68
SCDL – 4th Semester – Java Programming
Page 9 of 68
SCDL – 4th Semester – Java Programming
True/False
Question Java compiler stores the .class files in the path specified in CLASSPATH environmental
variable.
Correct Answer False
True/False
Question Java allows loops to be nested.
Page 10 of 68
SCDL – 4th Semester – Java Programming
Page 11 of 68
SCDL – 4th Semester – Java Programming
Correct Answer They can react to user input and dynamically change.
Your Answer They can react to user input and dynamically change.
True/False
Question Constructors can be overloaded like regular methods.
True/False
Question As abstract class must have at least one abstract method and others may be concrete or
abstract.
Correct Answer True
Page 12 of 68
SCDL – 4th Semester – Java Programming
Page 13 of 68
SCDL – 4th Semester – Java Programming
Page 14 of 68
SCDL – 4th Semester – Java Programming
Page 15 of 68
SCDL – 4th Semester – Java Programming
known as
True/False
Question Casting does not affect the original object or value.
Page 16 of 68
SCDL – 4th Semester – Java Programming
Page 17 of 68
SCDL – 4th Semester – Java Programming
Your Answer Before it enters a compute-intense section of code , Before it enters a memory-intense
section of code , When it knows there will be some idle time
True/False
Question Transient variable is variable that may not be serialized.
True/False
Question The for statement loop can be infinite.
True/False
Question A constructor is automatically called when an object is instantiated.
True/False
Question Float data type is useful when we need fractional values.
Correct Answer Can implement the runnable interface , Can extend the thread class
Your Answer Can implement the runnable interface , Can extend the thread class
Page 18 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Running threads can be suspended, which temporarily suspends its activity.
Correct Answer: True
Your Answer: True
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: Each class in java can have a finalizer method.
Correct Answer: True
Your Answer: True
Page 19 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Constructors can be overloaded like regular methods.
Correct Answer: True
Your Answer: True
True/False
Question: There is no Global Variable in Java.
Correct Answer: True
Your Answer: False
True/False
Question: Object oriented programming organizes a program around processes acting on data.
Correct Answer: False
Your Answer: False
True/False
Question: Threads priorities are not integers that specify the relative priority of one thread to
another.
Correct Answer: False
Your Answer: True
Page 20 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: When for loop start the execution, the initialization portion of the loop is executed.
Correct Answer: True
Your Answer: True
Page 21 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Casting between primitive types allows conversion of one primitive type to another.
Correct Answer: True
Your Answer: True
True/False
Question: In While loop condition can be any Boolean expression
Correct Answer: True
Your Answer: False
Page 22 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Threads of equal priority must voluntarily yield control to their peers.
Correct Answer: True
Your Answer: True
Page 23 of 68
SCDL – 4th Semester – Java Programming
Page 24 of 68
SCDL – 4th Semester – Java Programming
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
Page 25 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Is it necessary to implement all the methods of an interface while implementing the
interface
Correct Answer: False
Your Answer: False
True/False
Question: By default, all program import the java.lang package.
Correct Answer: True
Your Answer: True
True/False
Question: A thread can voluntarily relinquish control.
Correct Answer: False
Your Answer: False
Page 26 of 68
SCDL – 4th Semester – Java Programming
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: 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
True/False
Question: Byte can be Cast to Double Value.
Correct Answer: True
Your Answer: False
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
Page 27 of 68
SCDL – 4th Semester – Java Programming
True/False
Page 28 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: At any time, a thread can be terminated.
Correct Answer: True
Your Answer: True
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
True/False
Question: Boolean values can be cast into any other primitive type.
Correct Answer: False
Your Answer: False
Page 29 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: There is no Global Variable in Java.
Correct Answer: True
Your Answer: True
Page 30 of 68
SCDL – 4th Semester – Java Programming
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
Page 31 of 68
SCDL – 4th Semester – Java Programming
Your Answer: (+ +) , (+ =) , (- =)
True/False
Question: A thread can be preempted by a higher priority thread.
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: True
True/False
Question: With java Type Casts are checked at both compile-time and runtime.
Correct Answer: True
Your Answer: True
Page 32 of 68
SCDL – 4th Semester – Java Programming
Page 33 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: A thread can voluntarily relinquish control.
Correct Answer: False
Your Answer: False
True/False
Question: Suppose a given instance variable has been declared private, this instance variable is
manipulated by methods outside its class.
Correct Answer: False
Your Answer: False
Page 34 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Integer can Cast to byte value.
Correct Answer: False
Your Answer: True
True/False
Question: Is it necessary to implement all the methods of an interface while implementing the
interface
Correct Answer: False
Your Answer: False
True/False
Question: Interface can be extended.
Correct Answer: True
Your Answer: True
Page 35 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Java allows loops to be nested.
Correct Answer: True
Your Answer: True
True/False
Question: A thread can be blocked when waiting for a resource.
Correct Answer: True
Your Answer: True
Page 36 of 68
SCDL – 4th Semester – Java Programming
Your Answer: Number literals, character literals, boolean literals, string literals, etc.
True/False
Question: Nested if is less efficient then switch statement.
Correct Answer: True
Your Answer: True
Page 37 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: In While loop condition can be any Boolean expression
Correct Answer: True
Your Answer: True
True/False
Question: Short data type range is -30,376 to 32768.
Correct Answer: False
Your Answer: False
True/False
Question: Casting between primitive types allows conversion of one
primitive type to another.
Correct Answer: True
Your Answer: True
Page 38 of 68
SCDL – 4th Semester – Java Programming
Page 39 of 68
SCDL – 4th Semester – Java Programming
milliseconds
Correct Answer: sleep( )
Your Answer: sleep( )
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
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: True
Page 40 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: The for statement loop can be infinite.
Correct Answer: True
Your Answer: True
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: Running threads can be suspended, which temporarily
suspends its activity.
Correct Answer: True
Your Answer: True
Page 41 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Java allows loops to be nested.
Correct Answer: True
Your Answer: True
True/False
Question: The switch statement does not require a break.
Correct Answer: False
Your Answer: False
Page 42 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Transient variable is variable that may not be serialized.
Correct Answer: True
Your Answer: False
True/False
Question: A thread can be blocked when waiting for a resource.
Correct Answer: True
Your Answer: True
True/False
Question: With java Type Casts are checked at both compile-time and
runtime.
Correct Answer: True
Your Answer: False
Page 43 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: The for statement loop can be infinite.
Correct Answer: True
Your Answer: True
Page 44 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Casting occurs commonly between numeric types
Correct Answer: True
Your Answer: False
True/False
Question: Integer can Cast to byte value.
Correct Answer: False
Your Answer: True
True/False
Question: A thread can be preempted by a higher priority thread.
Correct Answer: True
Your Answer: True
True/False
Question: Interface can be extended.
Correct Answer: True
Your Answer: False
Page 45 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: The switch differs from the if in that switch can only
test for equality, whereas if can evaluate any type of Boolean expression.
Correct Answer: True
Your Answer: True
True/False
Question: Casting does not affect the original object or value.
Correct Answer: True
Your Answer: True
Page 46 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Transient variable is variable that may not be serialized.
Correct Answer: True
Your Answer: False
True/False
Question: Variable in an interface are implicitly final and static.
Correct Answer: True
Your Answer: False
True/False
Question: Java define eight simple types of data byte, short, int, long, char, float, double,
boolean.
Correct Answer: True
Your Answer: True
Page 47 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Integer can Cast to byte value.
Correct Answer: False
Your Answer: False
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
Page 48 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: The Switch statement can have multiple cases without a break statements between
them.
Correct Answer: True
Your Answer: True
True/False
Question: With java Type Casts are checked at both compile-time and runtime.
Correct Answer: True
Your Answer: True
True/False
Question: Running threads can be suspended, which temporarily suspends its activity.
Correct Answer: True
Your Answer: True
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
Page 49 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Object oriented programming organizes a program around processes acting on data.
Correct Answer: False
Your Answer: True
Page 50 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: There is no Global Variable in Java.
Correct Answer: True
Your Answer: True
True/False
Question: Boolean values can be cast into any other primitive type.
Correct Answer: False
Your Answer: False
True/False
Question: Short data type range is -30,376 to 32768.
Correct Answer: False
Your Answer: True
Page 51 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Boolean data type have only Yes or No value.
Correct Answer: True
Your Answer: True
True/False
Question: User-defined package can also be imported just like the standard packages.
Correct Answer: True
Your Answer: True
Page 52 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Do while loop always executes its body at least once, because its conditional
_expression is at the bottom of the loop.
Correct Answer: True
Your Answer: True
Page 53 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: In While loop condition can be any Boolean _expression
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: True
Page 54 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: There is no Global Variable in Java.
Correct Answer: True
Your Answer: True
True/False
Question: Boolean values can be cast into any other primitive type.
Correct Answer: False
Your Answer: False
True/False
Question: Short data type range is -30,376 to 32768.
Correct Answer: False
Your Answer: True
Page 55 of 68
SCDL – 4th Semester – Java Programming
Question: ________ is referred by a variable candidate for garbage collection when the variable
goes out of scope.
Correct Answer: Objects
Your Answer: Methods
True/False
Question: Threads of equal priority must voluntarily yield control to their peers.
Correct Answer: True
Your Answer: True
True/False
Question: Suppose a given instance variable has been declared private, this instance variable is
manipulated by methods outside its class.
Correct Answer: False
Your Answer: False
True/False
Question: Boolean data type have only Yes or No value.
Correct Answer: True
Your Answer: True
Page 56 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: User-defined package can also be imported just like the standard packages.
Correct Answer: True
Your Answer: True
Page 57 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Do while loop always executes its body at least once, because its conditional
_expression is at the bottom of the loop.
Correct Answer: True
Your Answer: True
True/False
Question: In While loop condition can be any Boolean _expression
Correct Answer: True
Your Answer: True
True/False
Question: Casting occurs commonly between numeric types
Correct Answer: True
Your Answer: True
Page 58 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Boolean data type have only Yes or No value.
Correct Answer: True
Your Answer: False
True/False
Question: A thread can be blocked when waiting for a resource.
Correct Answer: True
Your Answer: True
True/False
Question: Each class in java can have a finalizer method.
Correct Answer: True
Your Answer: False
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
Page 59 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: When for loop start the execution, the initialization portion of the loop is executed.
Correct Answer: True
Your Answer: True
Page 60 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Constructors can be overloaded like regular methods.
Correct Answer: True
Your Answer: True
Page 61 of 68
SCDL – 4th Semester – Java Programming
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: 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
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
Page 62 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Casting occurs commonly between numeric types
Correct Answer: True
Your Answer: True
True/False
Question: Boolean data type have only Yes or No value.
Correct Answer: True
Your Answer: False
Page 63 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: A thread can be blocked when waiting for a resource.
Correct Answer: True
Your Answer: True
True/False
Question: Each class in java can have a finalizer method.
Correct Answer: True
Your Answer: False
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: When for loop start the execution, the initialization portion of the loop is executed.
Page 64 of 68
SCDL – 4th Semester – Java Programming
True/False
Question: Constructors can be overloaded like regular methods.
Correct Answer: True
Your Answer: True
Page 65 of 68
SCDL – 4th Semester – Java Programming
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
Page 66 of 68
SCDL – 4th Semester – Java Programming
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
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
Page 67 of 68
SCDL – 4th Semester – Java Programming
Page 68 of 68