Font size
WorksheetsJava Feature
Total questions: 42
Worksheet time: 21mins
Which component is used to compile, debug and execute java program?
JVM
JDK
JRE
JIT
Which component is responsible for converting bytecode into machine specific code
JVM
JDK
JRE
JIT
Which component is responsible to run java program
JVM
JDK
JRE
JIT
What is the extension of compiled java classes
.classs
.java
.txt
.js
What is use of interpreter
They convert 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
Which of the following option leads to the portability and security of Java?
Bytecode is executed by JVM
The applet makes the Java code secure and portable
Use of exception handling
Dynamic binding between objects
Which of the following is not a Java features?
Dynamic
Architecture Neutral
Use of pointers
Object-oriented
Java is ______________________
Object based
Object Oriented
fully object oriented
procedural
Which of the following is not a Java features?
Dynamic
Architecture Neutral
Use of pointers
Object-oriented
(a) is the logical blue print that describes how a object should behave.
This keyword is used to mention that a method or variable belongs to a class and not to an individual object
(a)
Java is Completely Object Oriented Language
True
False
Maybe
Another name for Interpreter is?
JDK
JVM
JRE
SDK
Java Source Code is converted to this form after compilation stage
high level language
Bytecode
binary language
machine la
Which of these operators can be overloaded in java
*
/
+
-
The wrapping of data and methods together is referred to as
Abstraction
Encapsulation
Polymorphism
Debugging
The process of converting one data type to another explicitly is known as
Case Sensitivity
Polymorphism
Casting
Debugging
Which keyword is used for bringing in a package and using its classes and methods
include
import
public
void
Java has these following features ( Check all that apply)
Robust
Secure
Sandbox
Structured in nature
Procedure oriented Programming is also known as modular programming.
True
False
Which of the following is a limitation of procedure oriented programming paradigm.
Data/variables can be declared as global.
Data/variables can be declared as Local.
Main Program can be divided into sub programs.
Allow User defined functions.
OOP allows decomposition of a problem into number of entities called
(a)
Which of the following is a part of Java Development Kit?
Java runtime environment
Java Development kit
Java Virtual Machine
All of them
How many Bytes are reserved for "Char" data type in JAVA?
1 Byte
2 Bytes
2 Bits
14 Bits
A Java file with extension .class contains
Java source code
HTML Tags
Java Bytecodes
A program file written in java programming language
Which of the following is not a primitive data type of JAVA?
int
char
String
float
Java is a platform independent programming language because
It is written almost similar to English language
Java compiler translates the source code directly to the machine level language.
It follows the concept of “write once and compile everywhere”.
It compiles to an intermediate code targeting a virtual machine, which can be interpreted by an interpreter for a given OS.
So far the declaration of main() method is concerned, which of the following specification is not valid?
void
public
private
static
Scanner inp= new Scanner(System.in);
What is System.in in this declaration?
Any file storing data
Reference to standard input device, that is, keyboard
Reference to a scanner as an input device
It is a mouse as an input device
What is the output of following program?
class incr
{
public static void main(String args[])
{
int i=3;
System.out.println( ++i * 5);
}
}
(a)
Which of the following can not be used as correct variable name(identifier) in JAVA?
malloc
final
calloc
string
Which of the following features are not common in both java and c++?
The class declaration
The access modifiers
The Encapsulation of data and methods
multiple inheritance from class
Which among the following best describes encapsulation?
It is a way of combining various data members into a single unit
It is a way of combining various member functions into a single unit
It is a way of combining various data members and member functions into a single unit which can operate on any data
It is a way of combining various data members and member functions that operate on those data members into a single unit
If data members are private, what can we do to access them from the class object?
Create public member functions to access those data members
Create private member functions to access those data members
Create protected member functions to access those data members
Private data members can never be accessed from outside the class
Which feature can be implemented using encapsulation?
Inheritance
Abstraction
Polymorphism
Overloading
Which inheritance in java programming is not supported
Multiple inheritance
hierarchal inheritance
Multilevel inheritance
Single inheritance
What is subclass in java?
A subclass is a class that extends another class
A subclass is a class declared inside a class
Both above.
None of the above.
If class B is subclassed from class A then which is the correct syntax
class B:A{}
class B extends A{}
class B extends class A{}
class B implements A{}
Find which of the following uses encapsulation?
void main(){
int a;
void fun() { int a=10;
System.out.println(a);
fun(); }
class student{
int a;
public int b; };
class student {
int a;
public void disp(){
System.out.println(a);
} }
static topper() {
char name[10];
public int marks; }
Which of this keyword must be used to inherit a class?
super
this
extent
extends
Which among the following best defines abstraction?
Hiding the implementation
Showing the important data
Hiding the important data
Hiding the implementation and showing only the features
If two classes combine some private data members and provides public member functions to access and manipulate those data members. Where is abstraction used?
Using private access specifier for data members
Using class concept with both data members and member functions
Using public member functions to access and manipulate the data members
Data is not sufficient to decide what is being used
