Core java
- 17 April
Convert Roman Number to Integer in Java
Learn about how to convert Roman number to Integer in java.
- 15 April
How to Deep Copy Arraylist in Java
Learn about how to create deep copy of ArrayList in different ways.
- 15 April
[Solved] Variable might not have been initialized in Java
Learn about how to solve Variable might not have been initialized in Java.
- 07 April
Write a Program to Find the Maximum Difference between Two Adjacent Numbers in an Array of Positive Integers
In this article, we look at a problem : Given an Array of Positive Integers, Find the [Maximum Difference](https://java2blog.com/maximum-difference-between-two-elements-in-array/ "Maximum Difference") between Two Adjacent Numbers. For each pair of elements we need to compute their difference and find the Maximum value of all the differences in array. Let us look at an example, Consider this […]
- 06 April
[Solved] Exception in thread “main” java.lang.NullPointerException
In this tutorial, we will see the most frequent java exception i.e. Exception in thread main java.lang.NullPointerException. It is one of the Runtime Exception. Raise your hand if you ever got NullPointerException while working on java code. I am sure that this is the exception you might have encountered most frequently. You might also agree […]
- 05 April
Count occurrences of Character in String
In this article, we will look at a problem: Given an Input String and a Character, we have to Count Occurrences Of character in String. For Example, If the Given String is : "Java2Blog" and we have to count the occurrences of Character ‘a’ in the String. Therefore, Count of 'a' is : 2 , […]
- 27 March
Top Object-Oriented Programming Languages to Follow in 2021
Wherever you look, you face object-oriented programming languages. Well, many of the popular coding languages are object-oriented. The moment you decide to learn an object-oriented programming language, it might be quite overwhelming to pick the only one from this big pool of options. But don’t worry! Here you will find out which object-oriented programming languages […]
- 08 March
How to end program in java
Ho In this post, we will see how to end program in java. You can use System.exit(0) to end program in java. Using System.exit() to end java program You can use exit() method of System class to end java program. System.exit() causes Java virtual machine to exit and terminate the current process. You can call […]