Java Questions (Shambhu Patil)
Java Questions (Shambhu Patil)
TOKENS
OPERATORS
1.What is control flow statments? And how many types are there?
2.What is decision making statements ? And how many types are there?
3.Explain about if statement and give any one example
4.Explain about if else statement and give any one example
5.Explain about if else if statement and give any one example
6.Explain about switch statement and give any one example
7.What is break ? Whether break statement is optional or mandatory?
8.Can we able to write duplicate cases in switch statement?
9.What is looping statements? And how many types are there?
10.Explain about while loop and Give one example for while loop
11.Explain about do while loop and Give one example for do while loop
12.What is the difference between while loop and do while loop?
13.Explain working flow for loop
METHODS
STATIC MEMBERS
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.What is the use of getter and setter method ?
7.What are the advantages of data hiding?
8.WAJP to achieve data hiding.
9.Explain any one real time example for encapsulation
10.What is fully encapsulated class?
INHERITANCE
POLYMORPHISM
1.What is abstraction?
2.How to achieve abstraction?
3.What is abstract method? What is the syntax to create abstract method
4.What is concrete method?
5.What is abstract class?
6.What is concrete class?
7.Can we able to use abstract keyword for variables?
8.Why we go for Interface?
9.Explain any one real time example for Abstraction
9.What is an interface?
10.Can we able to create object for a interface?
11.Can we able to create a constructor inside the interface?
12.Can we able to create static methods inside the interface?
13.WAJP to achieve multiple inheritance .
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 ?
Access Modifiers:
Object class:
Strings :
1.What is String ?
2.Explain about String class?
3.Explain about String Buffer?
4.Explain about StringBuilder
5.Why String class is immutable in nature?
6.Difference between String, String Buffer and String Builder?
7.Can we able to create String Buffer object without new Keyword?
8.Can we able to create String Builder object without new Keyword?
9.Can we able to create String object without new Keyword?
Wrapper class:
Exception:
Collection Framework:
Arrays: