Thursday, August 14, 2014

10 TOP Free JAVA Programing Books for beginners & Experienced

Below are the list of Latest JAVA Programing Books for freshers beginners and experienced pdf free download.

JAVA Programing Books for beginners & Experienced


1. Data Structures and Algorithms with Object-Oriented Design Patterns in Java
Author : Bruno R. Preiss
Download : http://www.brpreiss.com/books/opus5/index.html
Description : Great book to learn data structure and algorithm in Java programming language. Filled with lots of simple but non trivial examples of implementing different data structures e.g. stack, queue, linked list in Java. Since data structure and algorithm are very very important for any Java programmer and quite a common topic in Java interview, it is absolutely must to have a strong command in both. If you are preparing for Java job interviews then you can also take a look at some of my favorite algorithm and data-structures questions, it may help in your preparation. If you like to read paperback edition, you can order it from Amazon as well.
FREE Java Programming Books
2. Java Application Development on Linux
Author : Carl Albing and Michael Schwarz
Download : http://javalinuxbook.com/
Description : A perfect Java book, if you are developing or running Java application on Linux environment, which is the case in most of the investment banks. You can download entire books as PDF, along with all example programs. Carl Albing and Michael Schwarz has done excellent job to to put everything needed to run and support a Java program in Linux environment including how to start, stop, or kill Java process, checking logs with some handy useful UNIX commands. Paperback edition of this book is also available here in Amazon.
Java Application Development on Linux

3.Core Servlets and JavaServer Pages
Author : by Marty Hall and Larry Brown
Download : http://pdf.coreservlets.com/
Description : Servlets and JSP are fundamental Java technologies for developing web applications in Java. Core Servlets and Java Server Pages, teaches you basics of these technologies. You can access all chapter of this book as FREE  PDF online, they are also available for download. Good thing about this Java books, is that source code and lecture notes are also available for FREE download. If you like to read paper book than you can also purchase, paperback edition of this book here

Core Servlets and JavaServer Pages
4. The Java Language Specification, Java SE 7 Edition (Java Series)
Author : James Gosling, Bill Joy, Guy L. Steele Jr., Gilad Bracha, Alex Buckley (Author)
Download : http://docs.oracle.com/javase/specs/jls/se7/jls7.pdf
Description : Official Java language specification for Java SE 7 edition is available online to view as HTML and download as PDF. This is the best FREE resource in Java, as it's from source and contains most up-to-date details about Java Programming language. If you like paperback edition, you can also purchase this books from amazon here.
the Java Language Specification
5. The Java Virtual Machine Specification, Java SE 7 Edition
Author : Tim Lindholm, Frank Yellin, Gilad Bracha, Alex Buckley
Download : http://docs.oracle.com/javase/specs/jvms/se7/jvms7.pdf
Description : Knowledge of Java Virtual Machine is very important for experienced Java developers, to get maximum out of JVM and avoid unnecessary optimization, which can be effectively done by JIT and JVM. For a beginner, It's too much ask, to know more about JVM, but since it's a free Java book, you can always download PDF and read it. Paperback edition of this Java book is also available for purchase in Amazon, here.
Java Virtual Machine Specification
6. The Java Tutorial: A Short Course on the Basics (5th Edition)
Author : Sharon Biocca Zakhour, Sowmya Kannan, and Raymond Gallardo
Download : http://www.oracle.com/technetwork/java/javase/downloads/java-se-7-tutorial-2012-02-28-1536013.html
Description : This is the official Java tutorials from Oracle, which explains different Java concepts in form of short courses e.g. JDBC, JMX, JAXB. All tutorials are available online and you can also download them for free as eBook, available in both .mobi and .epub format, nice to read in iPhone and android phones. If you love paperback edition, you can also order it from Amazon. By the way, these tutorials are really good quality and great way to explore different features of Java Programming language.
Short Course on the Basics
7. Thinking in Java 3rd edition
Author : Bruce Eckel
Download : http://www.mindview.net/Books/TIJ/
Description : Thinking in Java is a Jolt Award winner and one of the classic book to learn Java programming. Third edition of this books is freely available for download and you can download them as PDF format for offline read. By the way, fourth edition of this book is also available which covers most of new Java 5 concepts in detail, but it's NOT FREE. you can purchase that from Amazon. One more thing, first six chapters of Thinking in Java 4th edition is also available in PDF format for free download.
Thinking in Java 3rd edition
8. Introduction to Programming Using Java, Sixth Edition
Author : David J. Eck
Download : http://math.hws.edu/javanotes/
Description : This is another free Java book, which is available in both PDF and HTML format and teaches programming basics using Java programming language. I liked there chapter on Linked Data structure and Recursion, which teaches some of the key programming concept with simple, non trivial Java examples. You can also purchase paperback edition of this book on Amazon .
Introduction to Programming Using Java
9. Processing XML with Java (A Guide to SAX, DOM, JDOM, JAXP, and TrAX
Author : Elliotte Rusty Harold
Download : http://www.cafeconleche.org/books/xmljava/
Description : XML is one of the most desirable skill along with Java. You often need to work with XML files in large projects, as it's one of the most widely used data transport format. This Java book is a comprehensive and up-to-date collection of various XML technology and how to use them with Java programming language. You will learn about different XML parsers e.g. SAX and DOM, JDOM, XPATH and XSLT etc. If your work involve, XML and Java, then this is the book you should read. This Java book is freely available for online read, and you can buy paperback edition from any book store including Amazon.
Processing XML with Java
10. Think Java (How to Think Like a Computer Scientist)
Author : by Allen B. Downey
Download : http://greenteapress.com/thinkapjava/
Description : Don't confuse this book with Thinking in Java, it's different one. This is another great Java book for beginners which is available for FREE. You can download it as PDF or read it online in there site. It covers programming basics, object oriented concepts, essential software development technique, debugging etc. It's actually tailored for students, who wants to give Computer Science advanced placement (AP) exam, but turn out be a great book for any beginner. If you just started learning Java, give it a try. Paperback edition of this book is available in Amazon here.
Think Java
That's all guys, these are some really useful FREE Java books. As we all love free resources, go download them as PDF or view online them as HTML. If you have slow Internet connection, then it's better to download PDF eBooks and read them offline. By the way, nothing can substitute a paperback book, eBooks are good but not for continuous reading. So don't forget to have a paperback edition of at least one Java book, when you start learning Java. If you are absolute beginner then buy Head First Java.

18 LATEST TOP JAVA DESIGN PATTERN Interview Questions and Answers

Below are the list of Latest Java Design Pattern interview questions and answers for freshers beginners and experienced pdf free download.

JAVA DESIGN PATTERN Interview Questions and Answers

JAVA DESIGN PATTERN Interview Questions
JAVA DESIGN PATTERN Interview Questions
1. When to use Strategy Design Pattern in Java?
Strategy pattern in quite useful for implementing set of related algorithms e.g. compression algorithms, filtering strategies etc. Strategy design pattern allows you to create Context classes, which uses Strategy implementation classes for applying business rules. This pattern follow open closed design principle and quite useful in Java. One example of Strategy pattern from JDK itself is a Collections.sort() method and Comparator interface, which is a strategy interface and defines strategy for comparing objects. Because of this pattern, we don't need to modify sort() method (closed for modification) to compare any object, at same time we can implement Comparator interface to define new comparing strategy (open for extension).

2. What is Observer design pattern in Java? When do you use Observer pattern in Java?
This is one of the most common Java design pattern interview question. Observer pattern is based upon notification, there are two kinds of object Subject and Observer. Whenever there is change on subject's state observer will receive notification. See What is Observer design pattern in Java with real life example for more details.

3. Difference between Strategy and State design Pattern in Java?
This is an interesting Java design pattern interview questions as both Strategy and State pattern has same structure. If you look at UML class diagram for both pattern they look exactly same, but there intent is totally different. State design pattern is used to define and mange state of object, while Strategy pattern is used to define a set of interchangeable algorithm and let's client to choose one of them. So Strategy pattern is a client driven pattern while Object can manage there state itself.

4. What is decorator pattern in Java? Can you give an example of Decorator pattern?
Decorator pattern is another popular java design pattern question which is common because of its heavy usage in java.io package. BufferedReader and BufferedWriter are good example of decorator pattern in Java. See How to use Decorator pattern in Java fore more details.

5. When to use Composite design Pattern in Java? Have you used previously in your project?
This design pattern question is asked on Java interview not just to check familiarity with Composite pattern but also, whether candidate has real life experience or not. Composite pattern is also a core Java design pattern, which allows you to treat both whole and part object to treat in similar way. Client code, which deals with Composite or individual object doesn't differentiate on them, it is possible because Composite class also implement same interface as there individual part. One of the good example of Composite pattern from JDK is JPanel class, which is both Component and Container.  When paint() method is called on JPanel, it internally called paint() method of individual components and let them draw themselves. On second part of this design pattern interview question, be truthful, if you have used then say yes, otherwise say that you are familiar with concept and used it by your own. By the way always remember, giving an example from your project creates better impression.

6. What is Singleton pattern in Java? 
Singleton pattern in Java is a pattern which allows only one instance of Singleton class available in whole application. java.lang.Runtime is good example of Singleton pattern in Java. There are lot's of follow up questions on Singleton pattern see 10 Java singleton interview question answers for those followups

7. Can you write thread-safe Singleton in Java?
There are multiple ways to write thread-safe singleton in Java e.g by writing singleton using double checked locking, by using static Singleton instance initialized during class loading. By the way using Java enum to create thread-safe singleton is most simple way. See Why Enum singleton is better in Java for more details.

8. When to use Template method design Pattern in Java?
Template pattern is another popular core Java design pattern interview question. I have seen it appear many times in real life project itself. Template pattern outlines an algorithm in form of template method and let subclass implement individual steps. Key point to mention, while answering this question is that template method should be final, so that subclass can not override and change steps of algorithm, but same time individual step should be abstract, so that child classes can implement them.

9. What is Factory pattern in Java? What is advantage of using static factory method to create object?
Factory pattern in Java is a creation Java design pattern and favorite on many Java interviews.Factory pattern used to create object by providing static factory methods. There are many advantage of providing factory methods e.g. caching immutable objects, easy to introduce new objects etc. See What is Factory pattern in Java and benefits for more details.

10. Difference between Decorator and Proxy pattern in Java?
Another tricky Java design pattern question and trick here is that both Decorator and Proxy implements interface of the object they decorate or encapsulate. As I said, many Java design pattern can have similar or exactly same structure but they differ in there intent. Decorator pattern is used to implement functionality on already created object, while Proxy pattern is used for controlling access to object. One more difference between Decorator and Proxy design pattern is that, Decorator doesn't create object, instead it get object in it's constructor, while Proxy actually creates objects.

11. When to use Setter and Constructor Injection in Dependency Injection pattern?
Use Setter injection to provide optional dependencies of an object, while use Constructor injection to provide mandatory dependency of an object, without which it can not work. This question is related to Dependency Injection design pattern and mostly asked in context of Spring framework, which is now become an standard for developing Java application. Since Spring provides IOC container, it also gives you way to specify dependencies either by using setter methods or constructors. You can also take a look my previous post on same topic.

12. What is difference between Factory and Abstract factory in Java
see  here to answer this Java design pattern interview question.

13. When to use Adapter pattern in Java? Have you used it before in your project?
Use Adapter pattern when you need to make two class work with incompatible interfaces. Adapter pattern can also be used to encapsulate third party code, so that your application only depends upon Adapter, which can adapt itself when third party code changes or you moved to a different third party library. By the way this Java design pattern question can also be asked by providing actual scenario.

14. Can you write code to implement producer consumer design pattern in Java?
Producer consumer design pattern is a concurrency design pattern in Java which can be implemented using multiple way. if you are working in Java 5 then its better to use Concurrency util to implement producer consumer pattern instead of plain old wait and notify in Java.  Here is a good example of implementing producer consumer problem using BlockingQueue in Java.

15. What is Open closed design principle in Java?
Open closed design principle is one of the SOLID principle defined by Robert C. Martin, popularly known as Uncle Bob. This principle advices that a code should be open for extension but close for modification. At first this may look conflicting but once you explore power of polymorphism, you will start finding patterns which can provide stability and flexibility of this principle. One of the key example of this is State and Strategy design pattern, where Context class is closed for modification and new functionality is provided by writing new code by implementing new state of strategy. See this article to know more about Open closed principle.

16. What is Builder design pattern in Java? When do you use Builder pattern ?
Builder pattern in Java is another creational design pattern in Java and often asked in Java interviews because of its specific use when you need to build an object which requires multiple properties some optional and some mandatory. See When to use Builder pattern in Java for more details


17. Can you give an example of  SOLID design principles in Java?
There are lots of SOLID design pattern which forms acronym SOLID, read this list of SOLID design principles for Java programmer  to answer this Java interview question.

18. What is difference between Abstraction and Encapsulation in Java?
I have already covered answer of this Java interview question in my previous post as Difference between encapsulation and abstraction in Java. See there to answer this question.