Core Java Tutorial

Filed Under: Java

Welcome to Core Java Tutorial. I have written a lot on Core Java and Java EE frameworks. There was no index post for Core Java tutorial and I used to get emails asking to make one so that any beginner can follow them and learn core java programming. Finally, I got time and here I am listing all the core java tutorial related posts that I think will help you in learning core java in no time. This list is updated till Java-10 and soon it will be updated with the latest changes in Java-11 and beyond.

Core Java Tutorial

core java tutorial
These core java tutorial assume that you have some basic knowledge of programming. These core java tutorial posts are not for someone who doesn’t know if-else blocks or for-loop etc. So why waste any more time, just read them in the below order and learn core java programming.

If you think you know all about Java, just scroll below and read tutorials in “Advanced Topics” section, I am sure you will find something worth reading.

    Core Java Tutorial – Getting Started

  1. Setting up Java in Windows OS
  2. Writing your First Java Program
  3. Java Method
  4. Constructor in Java
  5. Java Access Modifiers – public, protected, private and default
  6. Java for loop
  7. Java while loop
  8. Java do while loop
  9. Java static keyword
  10. Java break keyword
  11. Java continue keyword
  12. Core Java Tutorial – Object Oriented Concepts

  13. OOPS Concepts
  14. Composition in Java
  15. Inheritance in Java
  16. Composition vs Inheritance in Java
  17. Java Nested Classes
  18. Core Java Tutorial – Data Types and Operators

  19. Java Data Types, Primitives and Binary Literals
  20. Java Autoboxing and Unboxing
  21. Java Wrapper Classes
  22. Java Ternary Operator
  23. Core Java Tutorial – Interface, Abstract Class

  24. Abstract Class in Java
  25. Interface in Java
  26. Difference between Abstract Class and Interface in Java
  27. Core Java Tutorial – String Manipulation

  28. Why String is immutable and final?
  29. Understanding Java String Pool
  30. Java String subsequence example
  31. Java String compareTo example
  32. Java String substring example
  33. Converting String to char and vice versa
  34. Java Split String example
  35. String to byte array and vice versa
  36. String to char array
  37. Java String concatenation
  38. String, StringBuffer and StringBuilder in Java
  39. String Programs in Java
  40. Core Java Tutorial – Arrays

  41. Initializing an Array in Java
  42. Two dimensional array in java
  43. Java Array of ArrayList
  44. String to String Array Example
  45. Java Variable Arguments Explained
  46. Java Array add elements
  47. Sorting an Array in Java
  48. Java String Array to String
  49. Java ArrayList to Array
  50. Converting Array to ArrayList in Java
  51. How to copy arrays in Java
  52. Core Java Tutorial – Annotation and Enum

  53. Java Annotations Tutorial
  54. Java @Override Annotation
  55. Java Enum Example Tutorial
  56. Core Java Tutorial – Collection & Generics

  57. Java Collections Framework Tutorial
  58. Java List
  59. Java ArrayList
  60. Java LinkedList
  61. Java Set
  62. Java HashSet
  63. Java TreeSet
  64. Java Map
  65. Java HashMap
  66. Java SortedMap
  67. Java TreeMap
  68. Java Queue
  69. Java Stack
  70. Java Iterator
  71. Java ListIterator
  72. Java PriorityQueue Example
  73. Priority Queue Java
  74. ArrayList vs CopyOnWriteArrayList
  75. How to avoid ConcurrentModificationException when using an Iterator
  76. Java Generics Example Tutorial
  77. Core Java Tutorial – IO Operations

  78. Create a New File in Java
  79. Delete a File in Java
  80. File separators in Java
  81. Delete a Directory Recursively in Java
  82. Rename and Move a File in Java
  83. Getting File Size in Java
  84. Get File Extension in Java
  85. How to check if File exists in Java
  86. How to check if File is a Directory in Java
  87. How to get File last modified date in Java
  88. Java FileNameFilter example to list specific files
  89. Java File Path, Absolute Path and Canonical Path Explained
  90. How to set File Permissions in Java
  91. 4 ways to copy File in Java
  92. Reading File in Java using BufferedReader, Scanner, Files
  93. Java Scanner Class
  94. Open a File in Java
  95. Read a File to String in Java
  96. Java Read file line by line
  97. How to write a File in Java
  98. How to append data to a File in Java
  99. Converting InputStream to File
  100. Java Random Access File Example
  101. Download File from URL Example
  102. Java GZip Example
  103. Temp Files in Java
  104. Reading a CSV File using Java Scanner Class
  105. Java Property File Example
  106. Core Java Tutorial – Exception Handling

  107. Exception Handling in Java
  108. java.lang.NoSuchMethodError
  109. java.lang.NullPointerException
  110. Core Java Tutorial – MultiThreading and Concurrency

  111. Threads in Java
  112. Thread Life Cycle
  113. Thread Sleep Example
  114. Thread join Example
  115. Thread wait, notify, notifyAll Example
  116. Thread Safety in Java – Synchronization
  117. Java ThreadLocal Example
  118. Java Timer and TimerTask Example
  119. Java Thread Pool Example
  120. Java Callable Future Example
  121. Java FutureTask Example
  122. Java ScheduledThreadPoolExecutor Example
  123. Java Lock Example
  124. Core Java Tutorial – Regular Expressions

  125. Regular Expressions in Java Example Tutorial
  126. Validating Email Address using Regular Expression in Java
  127. Validating Phone Number using Regex in Java
  128. Core Java Reflection API

  129. Java Reflection API Tutorial
  130. Java 7

  131. String in switch case
  132. Try with Resources – Java ARM
  133. Binary Literals in Java
  134. Underscores in Numeric Literals
  135. Catching Multiple Exceptions in a single catch block
  136. Java PosixFilePermission example to set File Permissions
  137. Java 8

  138. Java 8 Features Overview
  139. Java 8 interface changes
  140. Lambda Expressions in Java
  141. Stream API in Java
  142. Java Date Time API Example Tutorial
  143. Java Spliterator
  144. Java 9

  145. Java 9 Features
  146. Java 9 private method in interfaces
  147. Java 9 try-with-resources improvements
  148. Java 9 Optional class improvements
  149. Java 9 Stream API improvements
  150. Java 9 “var” for local variables
  151. Java 9 “_” (underscore) changes
  152. Java 9 Factory Methods for Immutable List
  153. Java 9 Factory Methods for Immutable Set
  154. Java 9 Factory Methods for Immutable Map
  155. Java 9 Modules
  156. Java 9 Module Basics Part 2
  157. Develop Java Module using Command Prompt
  158. Develop Java Module using Eclipse
  159. Develop Java Module using IntelliJ IDEA
  160. Java 10

  161. Java 10 Features
  162. Java 10 Local Variable Type Inference
  163. Java 11

  164. Java 11 Features
  165. 6 New Methods in Java 11 String Class
  166. Core Java Tutorial – Advanced Topics

  167. Java Heap Memory and Stack Memory
  168. Java is Pass by Value and not Pass by Reference
  169. JVM Memory Model and Garbage Collection
  170. Serialization in Java
  171. Java System Class
  172. Internationalization (i18n) in Java
  173. Atomic Operations in Java
  174. Thread Dump in Java
  175. Deadlocks in Java
  176. Sorting Objects in Java
  177. Understanding JDK, JRE and JVM
  178. Java Classloader Example Tutorial
  179. Java clone object

Well, it’s a lot of reading material for core java tutorial. But if you think that I have missed out on something, please go ahead and comment below. I will write something on that and add that to the list.

Reference: Oracle JavaSE Tutorial


  1. Deepak says:

    Hi Pankaj,
    In this link

    Where is CountdownLatch tutorial from the above link.
    It is missing in Core Java Tutorial – MultiThreading and Concurrency

    Update this Countdownlatch tutorial ?

  2. William T Wei says:

    Hi Pankaj,
    I enjoy reading your java article, learnt a lot from your work, you are a true java guru.
    Thanks for sharing knowledge with us all in the java field.

    William Wei

  3. gopinath says:

    Wonderful Tutorial Pankaj. Thanks a lo 🙂

  4. Saravana says:

    This is excellent.wonderful collections list.Good one for the beginners like me.i love your website..

  5. DK says:

    Sir you can write about final, synchronized keywords.

  6. kamlesh says:

    Thanks sir simple explain java concept .

  7. Sandeep y says:

    Great work ! Cheers !!!!
    This is really helpful . Can you please share the ebook/pdf of this .

  8. K.Manasa says:

    HI Pankaj sir,

    This is really useful content for learning core java. Thank you so much for sharing this document in an informative manner.

  9. preeti says:

    Thank you for sharing such an informative and useful post with us

  10. Babar Hussain says:

    Hello, I want to develop a website for tutorials and much more, kindly guide me.
    whats-app 03133971166

  11. david says:

    Journaldev is the best resource for learning java ,thanks for creating it .
    i have went through whole core java tutorial ,
    pankaj sir can you please suggest where to practice problems and from where to learn data structure and algorithms

  12. Sai Krishna says:


    I surfed the web and came to know about Journaldev and started following your materials to learn Java. I found the content really simple in an easily understandable way.

    While going through the following program from this link (

    package com.journaldev.util;

    public class MathUtils {

    public int add (int x, int y) {
    return x + y;

    public static void main(String args[]) throws Exception {
    MathUtils mu = new MathUtils();
    System.out.println(mu.add(5, 2));
    MathUtils.print(“Static Method”);

    public static void print(String s) {}


    I’ve few doubts, can you please clarify them. Why did we use these methods in our program 1) MathUtils.print(“Static Method”); and 2) public static void print(String s) {}

    Without these lines also I’m getting the same output. Can you please let me know the reason we’re using this.


    1. Pankaj says:

      It’s just showcasing how to define and call static methods.

  13. Martin says:

    Hello Pankaj.

    I want to know the difference between abstract class and interface in java 8,

    if we can declare and implement static methods in Interface in java 8,
    then abstract class and interface becomes same ..
    Could you please clarify on this ?

  14. Ved says:

    Recently came across to these articles and found out such good contents on java both theoretically and practically. It helps a lot for revising all the concepts of java before interviews . You have explained in such way which helps a lot for working professional. Thanks a ton ,keep doing good work.

  15. Barun Halder says:

    Your Tutorial in Core Java is Excellent. It covers all the topics in a graded manner. Java enthusiasts will definitely benefit out of it.
    Thanks and Regards,
    Barun Halder

  16. Yeremia Maroutian says:

    Hi, Pankaj.
    How are you doing. Please, let me know, to learn tutorials that you have sent me (String, Collections, Annotations, Enum,, Pass by value…etc,Singleton Design Pattern, etc.), if it is necessary to know the entire Core java, first, or one can do without it ( or just having basic idea about Core Java) either.

  17. Manu says:

    Could you post some scenario based problems in core Java? That will help a lot.

  18. User says:

    Since Java Collections are also part of Core Java concepts. Can you include them as well?

  19. Nayan says:

    Excellent content!! . It covers all the topics and is concise…pretty useful for brushing up your knowledge for interviews.well done!!

  20. Dhanush Thakral says:

    Hi Pankaj,

    Do you have any pdf for Java, just like Java Design Pattern.

    Please send me it will be easy for me to read.

  21. Yaga says:

    A quick review guide for the all the Java programmers helps a lot man

  22. Shivani says:


    I have read a lot of Java tutorials, this one seems easy and I can understand it better.
    It would be a great help if you could send me these contents over email.

    Thanks 🙂

  23. Divi says:

    Hi pankaj it would be helpful if you can please email me the book I want to start reading.
    And thanks for making java so easy for me to understand.

    Thanks again.

  24. karthikeyan . S says:

    Nice article for Begineers and very pleasure to inform for great article.

  25. Syed Shaheryar Shakeel says:

    Completion Stage and Completable Future are missing in Java 8 Features.

  26. Pratibha singh says:

    Please send me core java book off.

  27. Diana Eftaiha says:

    Good refresher and useful reference. Thanks

  28. Ashutosh says:

    Sir please send me.this PDF tutorial

  29. Meghna says:

    nice list of java tutorials, really helpful.

  30. Will says:

    this is a great tutorial for beginners and a good reference for experienced developers.

  31. praveen says:

    there is typo error in question 18 “in” should be replaced with “is”

    1. Pankaj says:

      Thanks Praveen for noticing and letting me know through comments, I have fixed it.

  32. Jinal Bhagadia says:

    Please email me the ebooks

    1. Sayali says:

      Could you please mail me this book.

  33. shashank says:

    Hello Pankaj

    I have one question regarding SEED in SecureRandom. what is mean by seed?
    Please help..


    1. Deepak says:

      Can you let me know which article is this ?

  34. gany says:

    wowww awesome….started reading this book and im unable to get out of this..

  35. Sudheer says:

    Please write articles on sample Collection programs..

  36. Manga says:

    great job!!! Please keep up this good work.

  37. Veera says:

    Hi Pankaj,

    Please do something for popup which ask to download paper or ebook. Once user download this then please disable these popup for them.

  38. Siva says:

    Really good job pankaj.Can you please share the download link for all these tutorials.
    Many thanks.

  39. Siva says:

    Pankaj, can you please share the download link for all of these tutorials.

  40. Divyesh Prajapati says:

    Really superb job..!
    Dont go to other sites.
    All in one place..!!!

  41. Naveen Kumar says:

    Hi Sir,
    Great Job
    I am really thankful to you.

  42. Ramanand says:

    Hi Pankaj,

    Excellent Job. Keep doing it as it helps all the learners.

  43. Sowmya says:

    Hi Pankaj,

    You have done an excellent Job. Keep doing it as it helps us.
    Please provide tutorial for webservices. It would be great helpful for us.

    Thanks for sharing knowledge with us


  44. Arit says:

    Please provide tutorial on MAP which having a key which is a Constant file in java.

    1. Pankaj says:

      I didn’t get what you are asking.

  45. Gracy says:

    Hi Pankaj,

    You have done an excellent Job!!!!! Keep doing it as it helps us.

    Thanks for sharing knowledge with us 🙂

    1. mossama says:

      Hi Pankaj
      Please I want to ask you if your tutorials is enough to be a good java developer and to have the ability to crack interviews as a junior Developer

  46. Anagha says:

    Really good site to learn all in one place:-)

  47. Max says:

    Pankaj is super java hero! Thank you, it’s really helpful set of mini-tutorials (excellent for revising before java interview).

  48. Selva Kumar says:

    Please provide a tutorial on primefaces push chat. We could not able to complete and we are hitting dead end everywhere.

Comments are closed.

Generic selectors
Exact matches only
Search in title
Search in content