Core Java Tutorial

corejava

Java is an object oriented language. It was originally developed by James Gosling at Sun Microsystems (which has since been acquired by Oracle) and released in 1995 as a core component of Sun Microsystems' Java platform.

It is intended to let application developers write once, run anywhere meaning that compiled Java code can run on all platforms that support Java without the need for recompilation. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture.

Below are some of the basic tutorials on core Java.

Fork Join Thread Pool

By Dhiraj , 18 June, 2020 12K

In this article, we will discuss ForkJoinPool and ForkJoinTask which is a high performance and parallel execution framework provided by Java. We will see different use cases of it and how it is differ...

SMPP Java Example(Client)

By Dhiraj , 03 December, 2017 27K

This article provides SMPP java example by creating a simple SMPP client that sends short messages to mobile subscriber.Using this client either we can make simple submit to send message to a single mobile subscriber or can broadcast a message to multiple mobile subscribers in one shot.Also, we will verify the delivery receipt. For the client purpose we will be using existing java SMPP client library...

Scatter and Gather Multiple Http Requests with Multithreading

By Dhiraj , 14 June, 2020 15K

In this article, we will implement scatter and gather patterns using multithreading concepts in Java. With this pattern, we can make multiple I/O requests(HTTP calls) parallelly and wait till the resp...

A Guide to Executor Service in Java

By Dhiraj , 13 June, 2020 9K

In this article, we will discuss the ExecutorService framework. We will discuss its instantiation, submitting tasks to it, and different ways to shutdown an executor service....

Things to Know About HashMap, HashTable and ConcurrentHashMap

By Dhiraj , 11 June, 2020 4K

In this article, we will be discussing the different hash-based data structures such as HashTable, HashMap, and Concurrent HashMap implementation in Java in depth....

Pros and Cons of Collection Types in Java

By Dhiraj , 09 November, 2019 44K

In this article, we will be discussing about the different core concepts of different data structures the advantages and the advantages and disadvantages of these different structures....

Comparing Files In Java

By Peter Hill , 15 November, 2018 46K

Java is one of the best programming languages that already took popularity over the C++ among the programmers. I am not saying this as a passionate Java developer. In the last 20 years, Java has proved its efficiency over other programming languages. Nowadays, Android apps development is generating more values to learn Java....

How Effective are Java 10 Features: A Brief Look

By Natasha , 04 June, 2018 4K

The release of Java 10, mere six months after the release of Java 9 on September 21, 2017 attracted much speculation. This was significant as it brought to the forefront Oracle’s new release cycle. As per the new accelerated release cycle, every six months a new version of Java will be released. Moreover, Oracle is also poised to release a LTS version every 3 years, which is a kind of major Java release....

AES Encryption in Javascript and Decryption in Java

By Dhiraj , 14 February, 2018 123K

AES stands for Advanced Encryption System and it's a symmetric encryption algorithm.Many times we require to encrypt some plain-text such as password at the client side and send it to server and then server decrypts it to process further.AES encryption and decryption is easier to implement in the same platform such as Android client and Java server but sometimes it becomes challenging to decrypt an AES encrypted password in cross-platform environment such as Javascript client and Java Server as spring mvc framework because if any system defaults do not match then the decryption will fail....

AES Encryption and Decryption in Java

By Dhiraj , 17 December, 2017 118K

Transmitting confidential data such as plain text password through wire is always vulnerable to security.It is always recommended to encrypt such information and use SSL to transmit those confidential data.Java provides multiple encryption algorithm for this.In this post, we will be discussing about AES(Advanced Encryption Standard) symmetric encryption algorithm in java with CBC mode which is faster and more secure than 3DES....

Hello World Java Program Breakup

By Dhiraj , 20 October, 2016 5K

The vary first program any programmer starts with is the Hello World program.Any of the Hello World program is though very basic and simple, the core concept and foundation of that programming language reides in it.Hence, today we will look into a simple program in java.We will be precisely observing the breakdown of Hello World program of java and closely look into the java...

Tools Supporting Java 9 New Modularity Features

By Dhiraj , 11 November, 2017 5K

In this article, we will be discussing about Java 9 new modularity features, different tools which are ready for java 9 new modularity features along with tools which are not ready for java 9 new modularity features....

Parse Word Document Using Apache POI

By Dhiraj , 03 June, 2017 83K

In this article we will be discussing about ways and techniques to read word documents in Java using Apache POI library. The word document may contain images, tables or plain text. Apart from this a standard word file has header and footers too. Here in the following examples we will be parsing a word document by reading its different paragraph, runs, images, tables along with headers and footers. We will also take a look into identifying different styles associated with the paragraphs such as font-size, font-family, font-color etc....

Random Password Generator in Java(using Passey)

By Dhiraj , 02 May, 2017 22K

This article is about random password generator in java. The password generated will be alphanumeric and special characters with configurable no of characters limit. Here we will be using an exisiting open source password validation and generation library for Java called passay to generate and validate passwords by peoviding different configurable constraints....

Overriding Equals and Hashcode Method in Java Example

By Dhiraj , 25 February, 2017 15K

In this article we will be discussing about what is equals() and hashcode() method defined in Object class in java along with why is it required to override them. We will also take a look into how to override these methods, the contract between equals() and hashcode() method,...

Comparable and Comparator in Java with Example

By Dhiraj , 22 January, 2017 8K

In Java when it comes to sort any collections,comparable and comparator comes into picture.Comparable and Comparator are two interfaces provided by Java Core API.Here we will take a look into why Comparable and Comparator are used for sorting though there are inbuilt methods provide...

Why Wait(), Notify() and NotifyAll() Defined in Object Class

By Dhiraj , 21 January, 2017 79K

Many developers are keen to know why wait, notify and notifyAll methods are defined in object class in java rather than in Thread class.Also, this is one of the favourite questions of an interviewe to test the basic concepts on multithreading.Hence, here we will try to...

How to Sort HashMap by Key and Value

By Dhiraj , 19 October, 2016 54K

HashMap is a class in Java that implements Map interface and holds values based on an unique key.As we know HashMap is an unsorted and unordered Map. Hence, requirements come where we need to sort the HashMap either by its key or values.In this post, we will take a look into how to sort a HashMap by key as well as by value....

How to Convert HashMap to List

By Dhiraj , 19 October, 2016 8K

HashMap is a class in Java that implements Map interface.It is an unsorted and unordered map whereas ArrayList implements List interface and maintains insertion order.Here we will try to convert a HashMap into an ArrayList....

Serialization and Deserialization Example

By Dhiraj , 21 October, 2016 9K

Serialization is a mechanism provided by java to save the state of one or more objects.During serialization, an object is represented as a sequence of bytes which holds the object and all of its instance variables.And once the object is serialized, whenever required it can be again deserialized to retain the object again with the exact same...