WorksheetsJava programming
Total questions: 20
Worksheet time: 10mins
Which statement is true about java ?
Java is a sequence-depended programming language
Java is a code dependent programming language
Java is a platform-dependent programming language
Java is a platform-independent programming language
Which component is used to compile,debug and execute the java programs ?
JRE
JIT
JDK
JVM
Which one of the following is not a java feature
Object-oriented
Use of pointers
Portable
Dynamic and Extensible
Which of these cannot be used for a variable name in java ?
Identifier & keyword
Identifier
Keyword
None of the mentioned
Which of the following is not an OOPS concept in java ?
Polymorphism
Inheritance
Compilation
Encapsulation
Which of these are selection statements in java
Break
Continue
For ( )
If ( )
Which of these keywords is used to define interfaces in java
intf
Intf
interface
Interface
Which of the following is a superclass of every class in java ?
ArrayList
Abstract class
Object class
String
Which of these packages contains the exception stack Overflow in java ?
Which of these statements is incorrect about tread ?
Start() method is used to begin execution of the thread
Run () method is used to begin execution of a thread before start() method in special cases
A thread can be formed by implementing runnable interface only
A thread can be formed by a class that extends thread class
Which of these keywords are used for the block to be examined for exceptions ?
Check
Throw
Catch
Try
Which one of the following is not an access modifier ?
Protected
Void
Public
Private
What is the numerical range of a char data tupe in java ?
0 to 256
-128 to 127
0 to 65535
0 to 32767
When does method overloading is determined?
At run time
At compile time
At coding time
At execution time
When overloading does not occur ?
More than one method with same name but different method signature and different number or type of parameters
More than one method with same name,same signature but different number of signature
More than one method with same name,same signature,same number of parameters but different type
More than one method with same , same number of parameters and type but different signature
What is it called if an object has its own life cycle and there is no owner
Aggregation
Composition
Encapsulation
Association
Method overriding is combination of inheritance and polymorphism ?
True
False
Which of the below is invalid identifier with the main method
Public
Static
Private
Final
How can we identify whether a compilation unit is class or interface from a .class file ?
Java source file header
Extension of compilation unit
We cannot different between class and interface
The class or interface name should be postfixed with unit type
What is use of interpreter ?
They covert bytecode to machine language code
They read high level code and execute them
They are intermediated between JIT and JVM
It is a synonym for JIT
