You are on page 1of 12

1Introduce yourself

2Project overview.
3Project related questions.
4Have you used web security in web service implementation ? 
5Authentication and authorization in Web services.
6Explain SSL ? 
7Have you used Stored Procedures ?
8Have you used tree set ? 
9Have you heard of Object Cloning in Java ? 
Have you used Synchronization in Java ? Which keyword is used and can it be
10
applied on class ?
11How can I implement multithreading in Java with 30 threads ? 

12Have you used HashMap in Java ? Can they Key be integer or a string or a class?

13Can I use object as a key in HashMap ?


14Why do we need Spring framework
15What are Spring features and benefits
Webservice flow  and configurations for how service is triggered from front end and
16
at back end
17Sample rest web services with example?
18How you will map the json data coming from ui in spring ?
19How do u map the controller url in spring?
20How container will know about spring-config
21       Where will you mention spring-config
22       How spring know about classes like controllers, services etc

23       How will you inject dependent beans? (by using xml and by using annotations)

24       What are bean scopes available?


25       What is Session Scope?
26       What is Global-Session Scope?
27       What is HttpSession?
       One client sends open session today and after 3days if same client come back
28
and try to access, will he get first day session or not?
29   In Singleton bean I injected Session scoped bean? What will happen?
30   What is Filter?
31   I have REST controller, want to do some process before process request?
32   What is auto-wire and its types?
33   How will u use auto-wiring? What is @Qualifier
34   What is serialization?
   I have class with 3 variables (let say var1, var2, var3), want to serialize that class
35
but don’t want to serialize var3? How will you implement this?
36   How you implemented file uploading concept in your previous project?
37   What are collections you used frequently?
38   ArrayList Vs Set?
39   What is Hashmap and Explain internal implementation of put/get method?
   Is it possible to add duplicate keys in Hashmap? What will happen if we add
40
duplicate keys?
41   Will Hashmap allow null keys?
42   Employee class is present and its objects are added in list
43   Employee class is present in jar file and its objects are added in list
44 How to sort list on the basis of the employeeID?
45 How to sort list on the basis of the employeeID without using Comparator?

1.       Introduce yourself


2.       What is super class of all the objects in java?
3.       Methods defined in Object class
4.       Can multiple inheritance supported in java? If so how?
5.       Multiple class inheritance is supported in java?
6.       Final keyword usage
7.       Marker interface & purpose of it
8.       What is thread?
9.       Heap memory vs stack memory?
10.   Local variables stored in which area?
11.   What is GROUP BY clause?
12.   What is dead lock?
13.   Servlet config Vs Servlet context
14.   Http methods in Servlet?
15.   GET Vs POST in servlet?
16.   What is logging ? Which log4j version , did u implement?
17.   Which log level do u use frequently?
18.   What is order of log levels?
 
19.   What is Spring boot?
20.   Spring vs Springboot?
21.   How can u define custom/own servlets in Springboot?
22.   What is filter register bean?
23.   What is SpringJdbcTemplate?
24.   How can u create datasource in Springboot application?
25.   How to load properties in Springboot application?

 
26.   Do you have experience in restful webservice framework?
 
27.   Do you have production support experience?
28.   What kind of queries , you get on daily basis in production support?
29.   How do you figure out data missing?
30.   Do you have production database access?
31.   When error occurs in production environment, do you check log file or Database tables?
32.   Which application server , do you use?
33.   Do you know unix?
34.   How to search keyword in a log file in unix?
35.   What is ‘grep’ in unix?
36.   How to check the process which are running?

1)what is static what is use of static ?


2)What is polymarphisam ?
 a)what is static ploymarphisam.
 b)what is dynamic polymarphisam.
3)How to create theard,How many ways to create theard ?
4)What is tha diffrent between comparable and comparatore ?
5)What is diffrent between hasmap and hastable?
6)How does hasmap internaly work can you give an example?
7)How to itarate hasmap element in hasmap object ?
8)What is serilalization what is use of serilalization?
9)What is genarics?
10)What is diffrents == and .equlas()?
11)What is use of spring ?
12)Tell me about Spring mvc ?
13)What is singletone class ?
14)What is use of Hibernate?
15)How to conncect Databace thourgh Hibernate framework ?
16)What is tha diffrent first level cache and second level cache ?
 
1.        Explain about your project in both business and Technical perspectives?
2.        List of scopes used in Spring?
3.        How we declare scope in spring?
4.        What is Dependency Injection?
5.        Benefits of spring?
6.        How you achieve security using spring in your application?
7.        How you develop spring application and what are configuration need to be done?
8.        What are the collections you have implemented in your previous project?
9.        Operation of LinkedList?
10.    How Hashmap works?
11.    How Treeset works?
12.    Adding employee details in Treeset in the type of class Employee, how sorting done in
Treeset?
13.    Explain about annotation @Controller, @Service, @Repository, @Autowired?
14.    Explain  the flow of Restful Webservices?
15.    How to handle a situation like, when read and write operation request at a time in
hibernate?
16.    How can we call stored procedure from JAVA?
17.    Benefits of stored procedure?
18.    What is dependency Injection/Inversion of control in Spring?
19.    Scopes available in Spring.
20.    Define singleton scope and how to write our own singleton class.
21.    Difference between overloading and overriding (w.r.t exception thrown, return type,
parameters)
22.    Internal working of HashMap,
23.    Use of Equals and Hashcode methods.
24.    What will happen if we use clone() on a singleton object.?
25.    What is required to use an userdefined method as a key in MAP.
26.    What all things to keep in mind if we want to implement Map on our own.
27.    Have you worked on stored procedures, how does they benefit?
28.    Why is hibernate required, advantages of hibernate.
29.    Indexes in database.
30.    Spring MVC Flow.
31.     Why do we have collection framework in Java? What are different interfaces in it?
32.      
33.   What is difference between Set and List ?
34.      
35.  What is Serialization? What if we declare a variable as transient and still we want to serialize it ?
36.      
37.   What is Singleton class, how do you create singleton class using Spring framework? In general
how do you create a Singleton class in java.
38.      
39.    What is cloning and different ways to clone the object. What is de-cloning?
40.      
41.     -Can we have a constructor in abstract class? Can we instantiate the abstract class?
42.      
43.     -Different scopes in Spring framework? Spring MVC  flow and how do we use application
context in spring?
44.      
45.     -How do you create Rest Client in Web Services?
46.      
47.     -How do we write a Restful Web Service method?
48.      
49.     -TreeSet implementation and on what basis does it sort  if we have custom objects in it?
50.     What is RMI?
51.      
52.     -HashMap internal implementation . HashCode and equals method implementation in code if
we use custom class as a key in HashMap.
53.      
54.     -Logging frameowork -how do we declare and implement different log levels  in our code.
1. Introduce yourself
2. What is super class of all the objects in java?
3. Methods defined in Object class
4. Can multiple inheritance supported in java? If so how?
5. Multiple class inheritance is supported in java?
6. Final keyword usage
7. Marker interface & purpose of it
8. What is thread?
9. Heap memory vs stack memory?
10. Local variables stored in which area?
11. What is GROUP BY clause?
12. What is dead lock?
13. Servlet config Vs Servlet context
14. Http methods in Servlet?
15. GET Vs POST in servlet?
16. What is logging ? Which log4j version , did u implement?
17. Which log level do u use frequently?
18. What is order of log levels?
19. What is Spring boot?
20. Spring vs Springboot?
21. How can u define custom/own servlets in Springboot?
22. What is filter register bean?
23. What is SpringJdbcTemplate?
24. How can u create datasource in Springboot application?
25. How to load properties in Springboot application?
26. Do you have experience in restful webservice framework?
27. Do you have production support experience?
28. What kind of queries , you get on daily basis in production support?
29. How do you figure out data missing?
30. Do you have production database access?
31. When error occurs in production environment, do you check log file or Database
tables?
32. Which application server , do you use?
33. Do you know unix?
34. How to search keyword in a log file in unix?
35. What is ‘grep’ in unix?
36. How to check the process which are running?
37. what is static what is use of static ?
38. What is polymarphisam ?
39. what is static ploymarphisam.
40. what is dynamic polymarphisam.
41. How to create theard,How many ways to create theard ?
42. What is tha diffrent between comparable and comparatore ?
43. What is diffrent between hasmap and hastable?
44. How does hasmap internaly work can you give an example?
45. How to itarate hasmap element in hasmap object ?
46. What is serilalization what is use of serilalization?
47. What is genarics?
48. What is diffrents == and .equlas()?
49. What is use of spring ?
50. Tell me about Spring mvc ?
51. What is singletone class ?
52. What is use of Hibernate?
53. How to conncect Databace thourgh Hibernate framework ?
54. What is tha diffrent first level cache and second level cache ?
55. Explain about your project in both business and Technical perspectives?
56. List of scopes used in Spring?
57. How we declare scope in spring?
58. What is Dependency Injection?
59. Benefits of spring?
60. How you achieve security using spring in your application?
61. How you develop spring application and what are configuration need to be done?
62. What are the collections you have implemented in your previous project?
63. Operation of LinkedList?
64. How Hashmap works?
65. How Treeset works?
66. Adding employee details in Treeset in the type of class Employee, how sorting done
in Treeset?
67. Explain about annotation @Controller, @Service, @Repository, @Autowired?
68. Explain  the flow of Restful Webservices?
69. How to handle a situation like, when read and write operation request at a time in
hibernate?
70. How can we call stored procedure from JAVA?
71. Benefits of stored procedure?
72. What is dependency Injection/Inversion of control in Spring?
73. Scopes available in Spring.
74. Define singleton scope and how to write our own singleton class.
75. Difference between overloading and overriding (w.r.t exception thrown, return type,
parameters)
76. Internal working of HashMap,
77. Use of Equals and Hashcode methods.
78. What will happen if we use clone() on a singleton object.?
79. What is required to use an userdefined method as a key in MAP.
80. What all things to keep in mind if we want to implement Map on our own.
81. Have you worked on stored procedures, how does they benefit?
82. Why is hibernate required, advantages of hibernate.
83. Indexes in database.
84. Spring MVC Flow.
85. Why do we have collection framework in Java? What are different interfaces in it?
86. What is difference between Set and List ?
87. What is Serialization? What if we declare a variable as transient and still we want to serialize
it ?
88. What is Singleton class, how do you create singleton class using Spring framework? In
general how do you create a Singleton class in java.
89. What is cloning and different ways to clone the object. What is de-cloning?
90. Can we have a constructor in abstract class? Can we instantiate the abstract class?
91. Different scopes in Spring framework? Spring MVC  flow and how do we use application
context in spring?
92. How do you create Rest Client in Web Services?
93. How do we write a Restful Web Service method?
94. TreeSet implementation and on what basis does it sort  if we have custom objects in it?
95. What is RMI?
96. HashMap internal implementation . HashCode and equals method implementation in code if
we use custom class as a key in HashMap.
97. Logging frameowork -how do we declare and implement different log levels  in our code.

Program logic questions


 
1.What is wrong or not wrong about below program
 
Abstract Class A {}
 
Class B extends A {
 
PSV Main () {
B obj = new B()
}
 
Can we compile or run this program?
 
Class A does not have a default constructor. When class b is instantiated, Class A constructor is also
called but since it does not have a default constructor, it will give error.
 
2.
 
Core Java
1. class loaders in java
2. dependency injection
3. what are different access & non access modifiers in java?
4. abstract class vs final class diff?
5. Singleton class vs Static Class?
5. what is the meaning of static class , method and variable?
6. what is meaning of final class, method and variable?
7. collection hierarchy and types of collection interfaces & differences
7. what are the methods to sort collections for primitive types, classes (both natural and custom sort
) - colletions.sort , comparable and comparator are used.
8. what is difference between hashmap vs treemap vs linkedhashmap vs Hashtable
9. what is difference between arraylist vs linkedlist vs vector
10. what is difference between enumeration vs iterator vs listiterator vs spliterator
11. what is difference between comparator vs comparable
12. what is logic of storing and retrieving objects from hashmap?
13. what is java version used 1.8?
   a. what is the use of Stream API?
  b. what is default methods in java 8
  c. what is a lambda expression
14. Exception hierarchy
15. collection hiearchy
16. how to create a thread?
17. thread life cycle?
18. Executor framework in java 1.5 ?
4. what is synchronized used for?
19. Lock API vs Synchronization?  
19. Overloading vs overriding
20. what is covariant type
21. overloading rules for access and non access modifiers?
 
Spring
1.       dependency injection
2.       explain bean scopes and what is the default scope.
3. life cycle of spring bean  (https://javabeginnerstutorial.com/spring-framework-tutorial/java-
spring-bean-lifecycle/)
4. annotation - @bean @configuration @auto-wire @qualifier @repository @service 
@component
5. autowiring types
6. Dependency check - simplex , object, complex, none.
7. can we have more than 1 application context ?
FileSystemXmlApplicationContext
a. ApplicationContext context =
                new ClassPathXmlApplicationContext(new String[] {}
b. <beans> <import resource="common/Spring-Common.xml"/>
        <import resource="connection/Spring-Connection.xml"/>
        <import resource="moduleA/Spring-ModuleA.xml"/> </beans>
ApplicationContext context =
                                new ClassPathXmlApplicationContext(Spring-All-Module.xml);
 
 
Spring MVC
1.       request life cycle of  spring mvc
2.       difference SimpleURLHandlerMapping, ControllerClassNameHandlerMapping,
BeanNameUrl Handler mapping – differences
3.       Different controller types and purpose of them
4.       Life cycle methods of SimpleFormController, abstractController.
5.       View Resolver purpose and what are the different view resolver you have used.
6.       Validations in Spring MVC – how to handle on server side
7.       Exceptions in Spring MVC – ExceptionHandler and ExceptionResolver
8.       How to integrate Hibernate with Spring.
 
Design pattern
1. creation pattern: Protype, Singleton, factory , abstractfactory
2. structural pattern: facade, adaptor, composite
2. Behavioural : 1. chain of responsibility 2. observer 3. Template method
 
               
 
db
1. DML statements
select, update, delete, insert
2. Diff between Truncate and delete
3. procedure vs function
4. Table vs View
5. What are different joins?
6. Index
7. clustered vs non-clustered index

Core Java
1. class loaders in java
2. dependency injection
3. what are different access & non access modifiers in java?
4. abstract class vs final class diff?                                                                                                               
5. Singleton class vs Static Class?
5. what is the meaning of static class , method and variable?
6. what is meaning of final class, method and variable?
7. collection hierarchy and types of collection interfaces & differences
7. what are the methods to sort collections for primitive types, classes (both natural and custom sort
) - colletions.sort , comparable and comparator are used.
8. what is difference between hashmap vs treemap vs linkedhashmap vs Hashtable
9. what is difference between arraylist vs linkedlist vs vector
10. what is difference between enumeration vs iterator vs listiterator vs spliterator
11. what is difference between comparator vs comparable
12. what is logic of storing and retrieving objects from hashmap?
13. what are java features used 1.8?
   a. what is the use of Stream API?
  b. what is default methods in java 8
  c. what is a lambda expression
d. what is an functional interface?
14. Explain Exception hierarchy (Throwable ->Exceptions & Error)
15. collection hierarchy (Iterable ->Collection-> List, Set, Queue -> ArrayList,LinkedList   ,  HashSet,
TreeSet    PriorityQueue.
16. how to create a thread?
17. thread life cycle?
18. What is Executor framework in java 1.5 ?
4. what is synchronized used for?
19. Lock API vs Synchronization?  
19. Overloading vs overriding
20. what is covariant type
21. overloading rules for access and non access modifiers?
 
22.   Deep copy vs shallow copy  (Obj.clone -> Deep copy vs  Class A obj = new A()   ; B obj =
A;  ->Shallow copy)
23.Heap memory vs Stack memory (What is stored in heap vs stack and how memory allocation
is done in both)
23.   Static vs singleton memory allocation.
 
 
 
 
Hibernate Questions:
1.       What is Hybernate used?
 
2.       How to integrate Hybernate with Spring.
·         Add hibernate-entitymanager, hibernate-core and spring-orm
dependencies.
·         Create Model classes and corresponding DAO implementations for
database operations. Note that DAO classes will use SessionFactory that will
be injected by Spring Bean configuration.
·         If you are using Hibernate 3, you need to configure
org.springframework.orm.hibernate3.LocalSessionFactoryBean or
org.springframework.orm.hibernate3.annotation.AnnotationSessionFactory
Bean in Spring Bean configuration file. For Hibernate 4, there is single class
org.springframework.orm.hibernate4.LocalSessionFactoryBean that should
be configured.
·         Note that we don’t need to use Hibernate Transaction Management,
we can leave it to Spring declarative transaction management using
@Transactional annotation.
 
3.       Session.Load vs Session.Get
4.       What are different states of an entity bean?  (Transient, Persistent and Detached.
Explain each state)
5.       Different Annotations purpose
 
·         javax.persistence.Entity: Used with model classes to specify that they are entity
beans.
·         javax.persistence.Table: Used with entity beans to define the corresponding
table name in database.
·         javax.persistence.Access: Used to define the access type, either field or
property. Default value is field and if you want hibernate to use getter/setter
methods then you need to set it to property.
·         javax.persistence.Id: Used to define the primary key in the entity bean.
·         javax.persistence.EmbeddedId: Used to define composite primary key in the
entity bean.
·         javax.persistence.Column: Used to define the column name in database table.
·         javax.persistence.GeneratedValue: Used to define the strategy to be used for
generation of primary key. Used in conjunction with
javax.persistence.GenerationType enum.
·         javax.persistence.OneToOne: Used to define the one-to-one mapping between
two entity beans. We have other similar annotations as OneToMany, ManyToOne
and ManyToMany
·         org.hibernate.annotations.Cascade: Used to define the cascading between two
entity beans, used with mappings. It works in conjunction with
org.hibernate.annotations.CascadeType
·         javax.persistence.PrimaryKeyJoinColumn: Used to define the property for
foreign key. Used with org.hibernate.annotations.GenericGenerator and
org.hibernate.annotations.Parameter
 
 
SQL/DB
 
1.  Explain DDL/DML/DCL statements
2. Diff between Truncate and delete
3. procedure vs function
4. Table vs View
5. What are different joins?
6. Index
7. clustered vs non-clustered index
8. WHERE clause vs Having clause (Having is used with Group by )
 
Design patterns: Core J2EE patterns
 
Please read 2 presentation tier, 2 business tier and 2 integration tier pattern & understand why it is
used.
 
http://www.corej2eepatterns.com/
 
Gang Of Four Design patterns:
 
Please read 2 creational, 2 structural and 2 behavioural patterns & understand why it is used.
 
https://springframework.guru/gang-of-four-design-patterns/
 
SOLID Principles: (This is optinal but you can explain using these principles if they ask any questions
on code reviews. You can explain using these principles)
 
https://en.wikipedia.org/wiki/SOLID

1. Observable 
2. Observer
3. Cyclicbarrier
4. Countdownlatch. 

1.       What is single Page architecture?


2.       What is difference between Angular & Angular 7/8?
3.       What is a module? How do we create a module?
4.       What is a component? How do we create a component?
5.       What is a directive? What are the different directive types? How do we create each
directive type?
6.       What is a pipe? What are default pipes available in Angular 8? How do we create a
custom pipe?
7.       What is routing? How do we implement routing in Angular 8- Explain the steps.
8.       What is Angular Service ? How to create an angular service? How to use an Angular
service?
 
Once you have refreshed these. We will discuss below extra topics in the call.
 
9.       How to handle form submission in Angular? (Reactive vs Template driven forms vs
material design forms)
10.   How to pass the data from parent component to child component , child component to
parent component?
 

1st round:

--If you have large amount of data in CSV file and How are you going handle that data
--What's the importance of hashcode and equals methods in java
-- How you will sort the customized the employee class and how you will implement the
employee class
--What kind of work you have done in Hibernate
--If you have department and employee(one to many) relationships and How are you going
to design the relationships in hibernate.
--How can we get only department details and any idean on cascading and lazy loading in
hibernate.
--Have you published any webserrvice
--How can we consume the web service
--We have wsdl file and how can we consume the externala web service operations.
--Are you familiar with Jboss server--
--Do you have any experience in SQL and are you good in basic joins in SQL

2nd round
-- Brief introduction about on you.
--what are the tools and technologies you worked on ur previous exp
--What kind of work you have done earlier
--Have you worked on threads
--We have some tasks to handle the large amount of data and how are going to handle with
threading.
--We have employee(id,name and adddres) with 1000 employee objects and how to convert
employee list to map and how are going to form the key and value pair.
--How to interate the dat from the list
--What's serializable interface and why do we need serializable interface
--Do you know the Garbage collection?
--How you be able to fix the garbage collection and memory leak issues?
--Do you know how enforce the garbage collection in java
--Do you know memory leaks in java and when it will be popup.
--How to read the native SQL queries in hibernate
--How does micro service interact with other exterrnal service.
--How do you test the rest serrvice
--how do you authenticate the microservice any idea?

3r round
--You have millions of data in database and how are going to design the rest service with
search 'ABC' key
--If System goes with OOO error and how are you going to handle this scenario.
--How garbage collection will work in java
--How are you going to design the cache for repeated objects.
--Differntiate the runtime exception and checked exception in java
--Do you know the exception bundling and How are you going hadle the exception in nth
method
ex: a->b->c->d exception occured in d method and how are you going to handle this
scenario.
--Have you worked on UI framework?
--What's the security mecanisam you have used in your project 

You might also like