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

JAVA INTERVIEW QUESTION

TOPIC1:OOPS CONCEPT
1.what are Oops Concept?
2.Difference Between Abstraction and Encapsulation?
Ans:absraction :is used for reduce complixity of code
Encapsulation:is used data protection
3.what is Polymorphism?
4.what is Runtime polymorphism(dynamic) and Compile time polymorphism(static)?and
when it Occures?
Runtime:which method should be executed it is decide in runtime
Compile time:which method should be executed it is decide in compile
4.what is Overriding and overloading?
5.Difference between abstract and interface?
6.can we override static method?
7.why java is platform independent?
8.what is Jdk,jre,jvm?
9.what is volatile and fixed variable?
volatile:once we make
10.where we use interface and abstract in your appliaction?
11.what is defference between dto and dao ?
12.what is singleton design pattern and how will you achieve?
13.why we make variable private?
14.why java not support multiple inheritence at class level?ambiguity
15.why java is not 100%object oriented langauge?
16.which is supermost class in java?and why?which are methods in object
class(wait,notify,notifyall,tostring)
17.why java is pass by value?
18.what is inheritence?
19.can we make constuctor final and static in java?
20.what is abstract method?
21.access specifires?
22.public static void main
23.why wait notify,notifyall present in object class?
Ans:step1:wait,notify,notifyall method provide intercommunication between threads
step2:it will make object thread safety
step3:if u place this method in thread class the object related to thread class
are only secure
step4:if u placed this method in object class u can make all object in program
thread safety
24.what are variables in java?explain each?

TOPIC2:JAVA 8 NEW FEATURES


1.what are java features?
2.which version of java have you used and why?
3.what is functional interface?
4.what are types of optional Class?
5.what is Optional Class in java?
6.what are types of functional interface?
7.what is purpose of imcomplete method in interface?
8.where you used functional interface?
9.tell me about stream api ?
10.what are the operation that we have in stream api/section?
11.where will you use stream api and lambdas expression in our project and why?
12.where will you use optional class?
13.can we inherit functional interface?
14.if we remove @Functional interface is it work has a functional interface?
15.how will you make use of lambdas expression using functional interface
16.what is stream api.
17.example for functional interface?types of functional interface?
18.lamdas expression how to println "Hello"
19.what is defference between map and flat map?
20.Defining lambdas expression using functional interface
21.give one example of defining lambdas express using functional interface
ans:@FunctionalInterface
public interface Anand {
public int manjunath(int x ,int y);

}
public class Kumar {
public static void main(String[] args) {
Anand anand = (a,b)->a+b;
int manjunath = anand.manjunath(19, 89);
System.out.println(manjunath );
}
22.wha is lambdas expression?

TOPIC3:STREAM API
1.program to filter given ArrayList?
2.program to find duplicate element ?
3.program to find the sum of ArrayList?
4.program to find non repeated Character from given string?
5.program to find repeated Character from given string?
6.program to find the maximum value element present in given straem?
7.write a program where Class is Empoyee and this Class Has fields like
id(key) and salary(value) and just display the salary into list?
8.what is http header?1.content-type 2.authoriation 3.Accept 4.
9.what are HTTP Method
10.what is difference between @controller and @Restcontroller
11.what is API Documentation using open api swagger
12.how do you hide the sensational data in RestController.
13.how will convert JSON object to java Object and vice versa
Ans:jackson library that has functionality

TOPIC4:THREADS CONCEPT
1.what is singleton design pattern?how will you achieve?how to secure this?
2.which design pattern you aware of?
3.what is thread in java?
4.what is multithreading in java?
5.disadvatage of threading in java?how to overcome ?
6.which method thread class have?
7.how to create thread in java?
8.which method runnable interface have?
9.life cycle of thread?what is thread pool?
10.why wait,notify,notifyall present in object class and why not in thread?
11.why we use syscronized keyword in java?
12.what is defference between wait and sleep?
13.what is thread priority?
14.how thread works on method and block?
15.In java which part will manage and create thread ?ans is JVM
16.practical example for multithreading?

TOPIC5:SPRING BOOT
1.what is dependency injection?and how will you achieve?
2.what is header and body in API?
3.why spring security is required?
4.how will you push your code from production environment to testing?
5.what is hibernate and how will you achieve?
6.what is AOP IN spring?
7.give practical example for exception and error?
8.how to create customer exception class?
9.annotation used in enity class?
10.minimumdependency added in spring boot application ?
11.what is spring Actuator?
12.what is s3 usage of it?
13.explain section of JWT TOKENS?
14.which are Steriotype annotation?
15.what are hibernate interface?
16.which version of spring and spring boot you will used?
17.what are functionality of spring boot?
18.what kind of annotaion used in it?
16.which data type that you used in entity class?
17.what is @Requestparam and @pathvarieable?
18.what is spring IOC?
19.what is n+1 in hibernate?
20.what are the type spring bean scope?
21.about status code?
22.difference between spring and springboot?
23.why spring boot and why not spring?

TOPIC6:STRING CONCEPT
1.what is difference between stringbuffer and stringbuilder?
2.why string buffer?
3.why string is immutable?what is constant pool?
4.how to create immutable class?
5.where string pool is located?
6.what is string literal?
7.what is Defference between comparable and comparator?
8.what is Striing intern?
9.what is failfast and failsafe?
10.what is difference between == and .equals?

TOPIC7:COLLCTION
1.what is collection?
2.what are collections in java?
3.defference between collection and colections in java?
4.defference between arrayList and LinkedList?
5.difference between hashmap and hashset?
6.difference between hashmap and concurrenthashmap?
7.

You might also like