Core Java
-
ArrayList clone() – ArrayList deep copy and shallow copy
Example program to ArrayList clone method example. ArrayList deep copy and shallow copy examples on Student Objects. 1. Introduction ArrayList…
Read More » -
Java 8 – Collections sort() method – List Custom Sort Example By Employe Objects (Id, Name, Age)
A complete guide to Sorting Custom Objects in java. Collections.sort() method does the sorting based on Comparable or Comparator implementation.…
Read More » -
How To Validate Phone Numbers in Java (Regular Expression + Google libphonenumber)
A quick guide to how to validate phone numbers in java for different countries such as the USA, IN. Example…
Read More » -
Java 14: Looking at the updated switch statement
JDK 14, released in March 2020, comes with an updated version of the switch statement. This has been a preview…
Read More » -
HelloWorld.java – Java Program to Print Hello World
Java Beginners’ first example program to print Hello World. 1. Introduction In this tutorial, We’ll learn how to print “Hello…
Read More » -
Java puzzlers from OCA part 2
Welcome to the second part of Java Puzzlers from OCA. In this part we will see an interesting case about…
Read More » -
Java puzzlers from OCA part 1
I’m reading Oracle Certified Associate Java SE Programmer book from Mala Gupta in my spare time and I’m surprised with…
Read More » -
Java 14: Pattern Matching for instanceof
Java 14 introduces Pattern Matching for instanceof, another preview language feature, that eliminates the need for casts when using instanceof.…
Read More » -
Java 14: Records
Java 14 arrived a few weeks ago and introduces the Record type, which is an immutable data carrier class designed…
Read More »