0% found this document useful (0 votes)
166 views4 pages

JAVA PART 2 - Shambhu Patil

The document contains a comprehensive list of Java-related questions covering various topics such as non-static members, constructors, encapsulation, inheritance, polymorphism, abstraction, packages, and access modifiers. Each section includes multiple questions aimed at exploring the concepts in depth. It serves as a study guide or reference for individuals looking to enhance their understanding of Java programming.

Uploaded by

vijibabusiva2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views4 pages

JAVA PART 2 - Shambhu Patil

The document contains a comprehensive list of Java-related questions covering various topics such as non-static members, constructors, encapsulation, inheritance, polymorphism, abstraction, packages, and access modifiers. Each section includes multiple questions aimed at exploring the concepts in depth. It serves as a study guide or reference for individuals looking to enhance their understanding of Java programming.

Uploaded by

vijibabusiva2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

PART 2 JAVA QUESTIONS

Wednesday, October 9, 2024 7:48 PM

Shambhugouda Patil
Test Yantra Software Solutions
Bengaluru, Karnataka

NON STATIC MEMBERS


=============================================

1.Explain about Non static members


2.Explain about non static variables and their characteristics?
3.Explain about non static methods and their characteristics?
4.Explain about non static initializers?
5.How to access static non variable within the class and outside the class?
6.How to access static non method within the class and outside the class?
7.What is object? And What is class?
8.Explain about object loading process?
9.Explain about new Keyword
10.What is Non Static Context ?
11.Inside the Non Static Context can we able to access static members directly ?
12.Inside the Non Static Context can we able to access non static members directly ?

CONSTRUCTOR
============================================

1.What is Constructor? What is the use of Constructor ?


2.What is the syntax to create a Constructor?
3.Based on the argument how many types of Constructor ? And explain their types.
4.Can we make constructor as private ?
5.What is Constructor overloading in java ? And what is the advantage of Constructor
Overloading? Write one example.
6.What is Constructor chaining in java ? And what is the advantage of Constructor
Chaining ? Write one example.
7.Can we have this() and super() statement inside the same constructor?
8.Is it possible to call a super class constructor from a sub class constructor?
9.Can we have both no argument Constructor and Parameterized Constructor in the
same Class?
10.Can a constructor return any value?
11.When the compiler will create default no argument constructor?
12.Can we able to create one Constructor inside the another Constructor ?
13.Can we able to call one Constructor inside the another Constructor ?

ENCAPSULATION
==================================================

1.What is Encapsulation
2.How to achieve encapsulation?
3.What is the advantage of Encapsulation
4.What is Data Hiding?
5.How to achieve Data Hiding?
6.Explain about private ?
7.What is the use of Getter and Setter method ?
8.What are the advantages of Data Hiding?
9.WAJP to achieve Data Hiding.
10.Explain any one real time example for encapsulation

INHERITANCE
=================================================

1.What is Relationship and What are the types we have?


2.What is has-A Relationship and What are the types we have?
3.Explain composition and how to achieve composition concept?
4.Explain Aggregation and how to achieve aggregation concept?
5.What is IS-A Relationship and How to achieve IS-A Relationship concept?
6.What is Inheritance and What are the types we have?
7.How to achieve IS-A relationship between two classes?
8.What is Single level inheritance and WAJP to demonstrate example for single level
Inheritance
9.What is Multilevel inheritance and WAJP to demonstrate example for multi level
Inheritance
10.What is Hierarchical inheritance and WAJP to demonstrate example for Hierarchical level
Inheritance
11.What is Multiple Inheritance and can we able to achieve multiple inheritance by using
class.
12.Explain Diamond problem (ambiguity) ?
13.What is Hybrid Inheritance and can we able to achieve hybrid Inheritance by using class.
14.What is non primitive typecasting or derived type casting? And what are the types we
have?
15.What is upcasting and what is the advantage of upcasting?
16.What is Down casting ? Can we able to achieve Down casting directly without performing
upcasting?
17.What is class cast exception? When we will get and what is the reason for that?
18.How to check whether the instance is present or not ? Explain about instanceof operator?
19.WAJP to demonstrate Non primitive typecasting

POLYMORPHISM
===================================================

1.What is polymorphism and what are the types we have?


2.What is Method Binding?
3.What is compile time polymorphism and how to achieve compile time polymorphism?
4.What is method overloading? WAJP for method overloading concept
5.Explain any one real time example for method overloading concept
6.What is constructor overloading? WAJP for constructor overloading concept
7.Explain method shadowing? WAJP for method shadowing concept
8.Explain variable shadowing? WAJP for variable shadowing concept
9.What is runtime polymorphism and how to achieve runtime polymorphism?
10.Explain Method Overriding and WAJP for method overriding concept
11.Expalin any one real time example for method overriding concept.
12.Explain about Final
13.What is final class ? Can we able to inherit final class?
14.What is final method ? Can we able to inherit final method? Can we able to override the
final method
15.What is final variable ? Can we able to do reinitialization for the final variable?
16.What is final Blank Variable ?

ABSTRACTION
====================================================

1.What is abstraction?
2.How to achieve abstraction?
3.To achieve abstraction which are the concepts we are using ?
4.What is abstract method? What is the syntax to create abstract method
5.What is concrete method?
6.What is abstract class?
7.What is concrete class?
8.Can we able to use abstract keyword for variables?
9.Why we go for Interface?
10.Explain any one real time example for Abstraction
11.What is an interface?
12.Can we able to create object for a interface?
13.Can we able to create a constructor inside the interface?
14.Can we able to create static methods inside the interface?
15.WAJP to achieve multiple inheritance .
16.Can we able to create concrete non static method inside the interface?
17.Can we able to create multi line initializers inside the interface.
18.Explain about types of interface.
19.Explain about abstract ?

PACKAGES
=================================================

1.What is package?
2.How many types of packages we have? Which are those?
3.How to access built-in packages?
4.Is it necessary to import java.lang package?
5.Explain Java.lang.Math ?
6.Can we able to create one package inside the another package

ACCESS MODIFIERS
===================================================

1.What is access modifier?


2.How many types of access modifiers are there? Which are those?
3.Can we able to access private members outside the class?
4.Can we able to access protected members outside the package ? If it is possible then
explain how to access?
5.Can we able to access default members outside the package?
6.Which access modifier is having highest visibility?
7.Can we able to use private access modifier for constructor?
8.Can we able to use private access modifier for class?

For Queries :
============

Instagram Id: shambhu_patil17


Mail Id: [email protected]

You might also like