Software Engineer - Java Questions

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Software Development Department

Software Engineer – Java

Total Marks – 10

Time – 15 Minutes

Name: _______________________________________________ Mobile Number: ________________

Question 1: Choose the best answer


Super class:
public class Manupulation(){
}
Sub class:
public class Addition extends Manipulation(){
}

Above code is an example of

(A) Inheritance (B) Class (C) Object (D) None

Question 2: Choose the best answer


public class Addition{
public static void main(String[] args){
Addion add = new Addition();
}
}

Above code is an example of

(A) Object (B) Class (C) Encapsulation (D) None

Question 3: Choose the best answer


Public class Manipulation(){ //Super class
public void add(){
}
}
public class Addition extends Manipulation(){ // Sub class
public void add(){
}
public static void main(String args[]){
Manipulation addition = new Addition();
addition.add();
}
}

Above code is an example of

(A) Polymorphism (B) Class (C) Encapsulation (D) Method Overriding

Question 4: Choose the best answer


public class Manipulation{ //Super class
public void add(){
………………
}
}
Public class Addition extends Manipulation(){
Public void add(){
………..
}
Public static void main(String args[]){
Manipulation addition = new Addition();
addition.add(); // It calls the Sub class add() method
}

Above code is an example of

(A) Method Overriding (B) Polymorphism (C) Encapsulation (D) None


Question 5: Choose the best answer
public abstract class Manupulation{
public abstract void add();
Public void subtract(){
}
}

Above code is an example of

(A) Abstract class (B) Polymorphism (C) Encapsulation (D) Method Overloding

Question 6: The interface contains only constants.

(A) True (B) False

Question 7: Java follows the object-oriented paradigm which allows us to maintain our code as the
combination of different type of objects that incorporates both data and behavior.

(A) True (B) False

Question 8: JRE is the implementation of JVM.

(A) True (B) False

Question 9: Classloader is a subsystem of JVM which is used to load class files.

(A) True (B) False

Question 10: Is Empty .java file name a valid source file name?

(A) Yes (B) No

You might also like