Wednesday, 24 May 2017

Important Java Interview Questions

                                                      Important Java Interview Questions

What is JVM ? Why is Java platform independent ?
What is the Difference between JDK and JRE ?
What are dynamic binding (run-time) and static binding (compile-time) ?
Can you override private or static method in Java ?
What is Autoboxing and Unboxing ?
What is the difference between an Interface and an Abstract class ?
What are pass by reference and pass by value ?
What is the difference between a synchronized method (coarse grained lock) and a synchronized block (fine grained lock) ?
Why Collection doesn’t extend Cloneable and Serializable interfaces ?
What is difference between fail-fast and fail-safe ?
What is the big-O notation?
What do System.gc() and Runtime.gc() methods do ?
What is difference amoung finally, final and finalize() ?
What is the difference between JDBC and JPA ?
Java Design Patterns:
What is design patterns ? Have you used any design pattern in your code ?
Can you name few design patterns used in standard JDK library?
Give an example where you prefer abstract class over interface ?
What is Singleton design pattern in Java ? Few issues and solutions in singleton (thread-safe)?
When to use Strategy Design Pattern in Java?
What is Observer design pattern in Java? When do you use Observer pattern in Java?
Difference between Strategy and State design Pattern in Java?
What is main benefit of using factory pattern ? Where do you use it?
What is MVC design pattern ? Give one example of MVC design pattern ?
What is Chain of Responsibility design pattern ?
What is Builder design pattern in Java? When do you use Builder pattern ?
What is Adapter design pattern ? Give examples of adapter design pattern in Java?
Difference between Decorator and Proxy pattern in Java?
Can you write code to implement producer consumer design pattern in Java?
Design a Vending Machine which can accept different coins, deliver different products?
What is different between web server and application server?
What is the difference between a Servlet and a JSP ?
What are the advantages of servlets over CGI?
What are servlets filters?
What is difference between ServletConfig and ServletContext?
How can we achieve transport layer security for our web application?
Are Servlets Thread Safe? How to achieve thread safety in servlets?
What are common tasks performed by Servlet Container?
What is the difference between Applet, Servlet and Scriptlet ?
What is the difference between session and cookie ?
Explain lifecycle of a JSP?
What is a sciptlet in JSP and what is its syntax?
What do the id and scope attribute mean in the action elements?
What is the difference between JspWriter and PrintWriter?
How is Session Management done in JSP?
What are the JSP implicit objects ?
How do you implement the auto refresh in JSP?
How to disable caching on back button of the browser?
In JSP page, how can we handle runtime exception?
What is the difference between ServletContext and PageContext?
Web Service:
What is the difference between SOAP (JAX-WS) and REST (JAX-RS) web services?
How would you decide what style of Web Service to use? SOAP or REST?
Which JAX-RS implementation did you use (Jersey, RESTEasy, Restlet, Spring)?
What is the difference between web service and API?
Differentiate between SOA (Service Oriented Architecture) versus WOA (Web Oriented Architecture)?
What tools do you use to test your Web Services?
What is the difference between SOA and a Web service?
Why not favor traditional style middle-ware such as RPC, CORBA, RMI and DCOM as opposed to Web services?
What are the types of information included in SOAP header?
How can you explain HTTP Binding in SOAP ?
As per JAX-RS recommentation, what and where will you use GET, POST, PUT, DELETE methods?
What is Spring? What are benefits of Spring framework?
Which are the Spring framework modules?
What is Inversion of Control (IoC) and Dependency Injection?
What is the difference between BeanFactory and ApplicationContext?
In how many ways, you can configure Spring into our application?
Explain Spring Bean lifecycle?
What are different Spring Bean Scopes?
Difference between constructor injection and setter injection?
Name some of the design patterns used in Spring Framework?
What is bean auto wiring?
What are the JSR-250 Annotations? Explain them?
Explain AOP in terms of cross-cutting Concern, Join Point, Advice...?
What are differnt data access implementations (JDBC, JPA, Data)?
Explain @RequestMapping annotation?
Explain Directives in Angular?
Do I need Jquery for Angular?
How is the data binding in Angular ?
What is “$rootScope” and how is it related with “$scope”?
Explain compile and link phase?
What is the difference between Factory and Service?
How to implement routing in Angular?
What are the different custom directive types in AngularJS?
How do we make HTTP get and post calls in Angular?
Explain the differences between Java and JavaScript?
What are undeclared and undefined variables?
What is ‘this’ keyword in JavaScript?
Does JavaScript support automatic type conversion?
What is called Variable typing in Javascript?
Explain the difference between “==” and “===”?
What are the different types of errors in JavaScript?
What is the difference between .call() and .apply()?
How are JavaScript and ECMA Script related?
How do JavaScript timers work? What is a drawback of JavaScript timers?
Whether jQuery HTML work for both HTML and XML documents?
Difference between ID selector and class selector in jQuery?
What is $(document).ready() function? Why should you use it?
What is the difference between onload() and document.ready()?
How do you add an HTML element in DOM tree?
Difference between $(this) and this keyword in jQuery?
What is difference between detach() and remove() method in jQuery?
What is main advantage of loading jQuery library using CDN?
What is difference between jQuery.get() and jQuery.ajax() method?
What is method chaining in jQuery? what is benefit of using method chaining?
Which one is more efficient, document.getElementbyId( "myId") or $("#myId)?
What is jQuery connect?
How can we debug jQuery?
What is the use of method?
Where jQuery code is getting executed?
Performance Tuning:
How would you improve performance of a Java application?
How do you tune database performance?
How would you refresh your cache?
How would you refresh your cache if your database is shared by more than one application?
How would you detect and minimize memory leaks in Java?
Why does the JVM crash with a core dump or a Dr.Watson error?
What is structure of Java Heap ? What is Perm Gen space in Heap ?
How do you identify minor and major garbage collection in Java?
What is difference between ParNew and DefNew Young Generation Garbage collector?
How do you find GC resulted due to calling System.gc()?
What is difference between Serial and Throughput Garbage collector?
When does an Object becomes eligible for Garbage collection in Java ?
What is finalize method in Java ? When does Garbage collector calls finalize method in Java ?
Can we force Garbage collector to run at any time ?
Does Garbage collection occur in permanent generation space in JVM?
How to you monitor garbage collection activities?
What are some indications that you need to increase the SHARED_POOL_SIZE parameter?
When looking at v$sysstat you see that sorts (disk) is high. Is this bad or good? If bad, how do you correct it?
When should you increase copy latches? What parameters control copy latches?

Enjoy Learning:)

1 comment:

  1. Questionnaire is good, but would be more happy if you provide answers too.