Java Tutorial, Java EE Tutorials

Java Tutorials

I have written a lot of java tutorials here into many categories. Some of them are in core java tutorial whereas some of them are in J2EE tutorial or Java EE tutorial area. As the number of posts grows, keeping track of them becomes harder. So I have provided a summary post for most of the categories where you can read them in the order for better understanding.

Java Tutorials

This post is aimed to include all the summary posts in java tutorials that you should go through to have a clear understanding of that area.

1. Collections Framework

java tutorial, collections framework tutorial
Java Collections are one of the core frameworks of Java language. We use Collections almost in every application, this tutorial will explain Java Collections Framework in detail. Learn about collections framework interfaces, classes and algorithms in detail.

2. Java Tutorial – XML

java tutorial, java xml tutorial
XML is widely used technology to store or transport data and it’s platform independent. Java provides various API’s to read, write or manipulate XML data. This tutorial explains about DOM Parser, SAX Parser, JDOM Parser, StAX Parser and misc xml tasks.

3. Java Regular Expression

java tutorial, java regular expression tutorial
A regular expression defines a pattern for a String. Regular Expressions can be used to search, edit or manipulate text. A tutorial covering java.util.regex package classes, regular expression symbols, metacharacters, quantifiers and capturing groups in detail with example.

4. Java IO

JAVA Tutorial, Java IO Tutorial
Java IO package contains classes to work with Files, Stream data and File System. A comprehensive tutorial covering various aspects of Files, Directories, Create a File, Read a File, Write a File, Delete a File/Directory, RandomAccessFile, Temp File, ZIP and Unzip File/Directory, GZIP and Serialization/Deserialization examples.

5. Java Multithreading

java tutorial, java thread tutorial
Java Thread tutorial explains difference between Process and Thread, how we can create Thread by extending Thread class or implement Runnable interface, important methods of Thread class, different states of Thread, Thread safety and Synchronization, how to get thread dump in java, deadlock situation and how to analyze and avoid it, Timer Thread, Daemon Thread, ThreadLocal implementation, Producer-Consumer problem, Thread Pool, Executors framework and Callable interface returning value from thread execution.

6. Java Logging

Java tutorial, java logging
Java Logging API was introduced in Java 1.4, a complete tutorial explaining Logger class, different Logging Levels, different Logging Handlers, Logging Formatters, Log Manager and Logging configuration property files.

7. Java Annotations

Learn about the Java annotations and the benefits of using annotations. The post explains java built-in annotations, how to create custom annotations, meta annotations and how we can parse annotations of a class using Reflection API.

8. Java Generics

Generics was introduced in Java 5 to remove type-casting in using Collection classes and to provide means for type checking at compile time. We can use Generics to create generic type interface and classes and we can use it with methods too. Learn about features of Generics in great detail in this extensive post.

9. Java Exception Handling

We don’t like exceptions but we always have to deal with them, great news is that Java Exception handling framework is very robust and easy to understand and use. Check out the post to learn about Exception Handling and best practices to follow for better exception handling.

10. Java Reflection

Reflection is a very powerful API and used in almost all the Java, J2EE frameworks like Spring, Hibernate, JUnit and Tomcat. It’s one of the advanced topics of core java and used in framework implementations, check out this post to learn about Java Reflection API with a lot of examples.

11. Java Design Patterns

Design Patterns provide a standard solution for common software development recurring problems. There are 22 design patterns in java divided into three categories – creational, structural and behavioral design patterns. Check out the post to learn about these design patterns, their intent and how to implement them with an example.

12. JDBC Tutorial

Java DataBase Connectivity (JDBC) API provides industry standard and database-independent connectivity to work with relational databases. A comprehensive post with 12 tutorials explaining different aspects of JDBC API, DataSource and JDBC integration with Spring Framework.

Java EE Tutorial

1. Servlet JSP Tutorial

java ee tutorial, java servlet jsp tutorial
Servlet and JSP are the at the heart of Java EE. All the Java EE frameworks are built on top of Servlets and JSPs. A comprehensive post with more than 20 tutorials to help you learn Servlets and JSPs backed with example programs.

2. Struts 2 Tutorial

java ee tutorial, java tutorial, struts2 tutorial
Struts2 is one of the widely used web application framework. It’s built on top of WebWork and Struts1 and provides flexibility in developing web application. It’s an industry standard MVC framework. The article lists out 20+ tutorials for Struts2 that you can read to learn about Struts2 in detail. All the examples are tested with Struts2 version and most of the tutorials have attached projects that you can download for better understanding.

3. Spring Framework

java ee tutorial, java tutorial, spring tutorial
Spring is the most widely used Java EE Web application framework. It’s built on the principles of Dependency Injection and Aspect-Oriented Programming. It’s an open-source framework and the best part is the different modules for integration with other frameworks, such as Spring ORM, Spring MVC, etc. This article lists more than 20 tutorials I have written for different components of the Spring framework. The articles are in the order and serve as a great resource for newbie as well as experienced ones. All the project comes with downloadable projects that you can use to learn more. Also, the projects are tested with latest Spring 4 versions and provide XML as well as annotation-based configuration details.

4. PrimeFaces

java ee tutorial, java tutorial, primefaces tutorial

PrimeFaces is one of the top implementations of JSF 2. PrimeFaces is very easy to use and comes with a lot of components to create an awesome effect on view pages. One of the most useful features of PrimeFaces is the support for creating responsive view pages, that is a must-have for current web pages. We have more than 20 articles on PrimeFaces that you can read in the order to start as a beginner and become a pro.

5. Hibernate

java ee tutorial, java tutorial, struts2 tutorial
Hibernate is the best Java ORM tool in the current market. Recently I have written a lot on the hibernate framework. So this article is as an index of all the posts. You can go through these in sequence to learn the hibernate from scratch. Most of these come with downloadable projects that you can use to learn more. All the projects are tested with Hibernate 4 version.

6. Apache Axis 2

java tutorial, java ee tutorial, axis2 tutorial
Apache Axis 2 is one of the widely used SOAP based web services framework. Learn how to use Apache Axis 2 to create SOAP based web services, complete tutorial with client program to test the web service.

7. Jersey

java ee tutorial, java tutorial, jersey tutorial

Jersey is an open-source JAX-RS implementation for building Restful Web Services. Learn how to use Jersey to create Restful web services with the use of JAXB, Exception Handling approach and Jersey client program to test the web service.

8. Memcached Tutorial

Memcached Tutorial
Memcached is Free & open source, high-performance, distributed memory object caching system. Memcached is used by almost all the major websites with huge data, for example YouTube, Wikipedia, Twitter etc. Learn how to install memcached server on Windows, Unix, Mac OS and CentOS operating systems and how to use it’s Java and PHP API to connect to memcached server and use it as in-memory cache.

Java Testing Frameworks

There are many testing frameworks in Java. I have written a lot on the popular testing frameworks.

1. JUnit Tutorial

junit architecture
JUnit 5 has brought a lot of new features that were missing in JUnit earlier versions. This article goes in depth of the JUnit components, its architecture, and how to start using JUnit test cases in your java application.

2. TestNG Tutorial

TestNG HTML Report Output
TestNG is a testing framework for Java application that is inspired from JUnit and NUnit. You will learn about TestNG architecture, how to write TestNG test cases, creating test suites, running test suites through the command line, and many more features of TestNG.

3. Mockito Tutorial

Mockito Tutorial
Mockito is a java based mocking framework, used in conjunction with other testing frameworks such as JUnit and TestNG.

It internally uses the Java Reflection API and allows to create objects of service. A mock object returns a dummy data and avoids external dependencies. It simplifies the development of tests by mocking external dependencies and apply the mocks into the code under test.

4. EasyMock Tutorial

EasyMock Tutorial

EasyMock allows us to create mock objects of interfaces and concrete classes and specify their behaviors. Then we can use these mocks to write code to test our main classes. This way writing unit tests are simplified as we don’t need to care about external dependencies.



  1. java developer says:

    The Java platform gives you the ability to write code quickly and still deliver high-performance applications. If you are a professional Java developer and looking for the facts about Java developer salary, then it totally depends on the key skills you hold.

  2. fromPHPToJava says:

    Thanks a lot for these, man! I’m switching from PHP 7 OOP to Java and it looks like these posts will help a lot. I already started – did around 5 micro-projects and some completed some tutorials too – and I’m pleased to say things are going great! I thought I would like Java – I /love/ Java!

    1. JavaScriptToJava says:

      hi fromPHPToJava,
      can you please tell me how you have made 5 microprojects ,I am also learning java and i want to practice concepts??

      1. MakeAWorthLifeByJava says:

        Just search gg to find some ideas and go ahead. If you have any problem, you should stop a little bit and learn to take knowledge about it and then return to your project and continue to finish this project. I think so!

  3. Bhuman says:

    Good on you mate. Your tutorials on Spring framework are really good. Cheers for your knowledge sharing!

  4. Gaurav kwatra says:

    Your website continuously re-loaded after every 10-20 seconds. Please check this problem. I continuously
    follow your blog.

    1. Pankaj says:

      I just tried multiple times, not facing this issue. Can you check once more in some different browser? Also do you see which resource it’s waiting for?

      1. Vijay Jetti says:

        Hi Pankaj,

        Even I am facing an issue like keep on reloading after every 10-20 secs. I have observed the same in Hibernate Interview questions page. Could you please have a look into this. I will follow your blog regularly . Thanks a lot for your knowledge sharing with the people

  5. Cyrus Haroon says:

    I’m a follower of your posts.Keep it up.

  6. karan says:

    Hi Pankaj i am looking for Spring Security ACL real time tutorial. Please help me

  7. vijay patel says:

    Please Send Me Android Related Example in my Emailid

  8. Kailas says:

    Hi Pankaj sir,

    I read your tutorials.

    All are very helpfull.

    Now I am working on your get which get url from google

    But am not getting tresults.

    Waiting for replay.

    1. Kailas says:

      code to get url from google.

  9. Bharath says:

    Hello Pankaj can you please post the gradle tutorial .

    1. Bharath says:

      All your tutorial’s are understandable and wonderful. So requesting you to post gradle tutorial. Please Pankaj

  10. Venkata Sriram says:

    Hi Sir,
    Please add tutorials on Maven as per real time usage like plugins,profiles other high end topics.want to learn from you.

    Venkata Sriram

  11. divya says:

    Is it common to create a framework in java. This was a question asked in an interview. I did not understand what they meant actually. Let me know if it is a general one.

    1. kumar says:

      hi divya.. i , too, am curious after having looked at your question.. I din’t get you..
      but up to best of my understanding, frameworks acts like a skelton, a structure around which the fleshing out of your application occurs, they consists of frozen spots(structural components – unmodifiable) and hot spots(contributed by developer)…
      … in most often cases framework are not created unless they tend to build a path or provide a layered abstraction for the requirements…//

      please do comment if you find any better…

      thank you.

  12. Nanda says:

    Plz add algorithms and datastructures tutorials

  13. Mahmoud Bahaa says:

    great work , thank you .

  14. karthik says:

    Very useful tutorials, thanks a lot Pankaj. Keep going. If possible publish tutorials on Spring & EMBERJS.

  15. siva says:

    Excellent Post !!!

  16. Julia says:

    Good job, thank you for your excellent work!!!

  17. kiran chopra says:

    hello sir

    i have knowledge of core java, can you suggest me whether i can make a website or not.

  18. mad guy says:

    good work

  19. ahmed says:

    sir my self ahmed i entirely new to java programming now i am studing fundamental only… really i am confused with that… can u guide me or give some tip

  20. Avinash Gupta says:

    Hi team,

    It is annoying when you scrolling and never see the bottom box that contains #popular tags.

    In section
    1) java
    2) web design etc.

  21. Raju Gurung says:

    Please do a tutorial on Maven.

  22. sunil kumar says:

    Dear Pankaj,

    Love your tutorials… Great work.

  23. krnpatel says:

    Do you know,how to use crystal report in Java?

    1. dev says:

      I used it in web application. and it works for me.

  24. Vipin says:

    Hi Pankaj,

    Thanks for your wonderful tutorials, really helpful.

    Can you make tutorial on Spring web flow, please?


  25. Justin Joseph says:

    please provide an example using mongoDB with restful web services

  26. Pushparaj says:

    Thanks a lot Pankaj. Keep going. If possible publish tutorials on MongoDB & Angular JS.

  27. Anand Shukla says:

    Hello Sir,

    I have two questions :
    1)If we overload a method and we pass String in one method and Object in another So while calling if we pass ‘null’ then which method will be called and why?
    2)If we overload a method and we pass String in one method and Integer in another So while calling if we pass ‘null’ then which method will be called and why?

  28. Baboutini says:


    I have taked you source code for menubar programmatically.
    When i run, the menubar could not display properly on mozilla.
    I used primefaces 5.1.

    please help me

    1. ss says:

      take – taken – taken
      its making me shame on you that how you are careless about the spelling…

  29. suneel says:

    Hi sir i want to know about OFBIZ frame work for ERP and please let me know future on OFBIZ .Thanq.

  30. Max says:

    Thanks a lot for your articles, Pankaj! They’re very useful and comprehensible

  31. Ibrahim says:

    Thank u man. Super website for programmer . again thank u

  32. Hari says:

    Thank’s for everything sir and this is a nice tutorial site for who want to became a software developers .

  33. Febri says:

    Pankaj Thank you very much for all tutorials in this site, i’m just a hungry student who doesn’t afford to pay a lot books, Thanks again. May God bless you..

  34. raj says:

    i am just start to learn java can send me/give me use full material or link that help me to under stand java easlly

  35. Vivek Kosta says:


    Articles provided by you are very helpful. I am stuck with ActionController class in struts. I have been searching about the usage of this class but could not get anything relevant. Could you please help me out providing some links or any demo program using ActionController class?

    Thank you!

    Vivek Kosta

    1. Pankaj says:

      I haven’t worked on Struts1 recently, please google it. You will find some good resources.

  36. Pranaya says:

    Please upload RMI tutorial

  37. Venkat says:

    Dear Pankaj,

    I’m a great follower of your posts which are high in quality and comfortable to understand.

    We always thankful for your Great work

  38. johnybasha says:

    Hi Pankaj,

    I read your articles on Collections and Multi Threading. They are in detail, useful and easy to understand. Thanks for your great work. I believe these tutorials are helping many java programmer like me all over. I have one request. I am searching for good tutorial on Java memory structure to understand how java objects/members/variables stored in memory. But I am not able to get the complete understanding. It will be appreciated if you can post a tutorial on Java Memory Architecture. This helps in understanding Collections, Multi Threading even better. Thanks in advance if you consider this request.

Comments are closed.

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors