Posts from Java

Atomic variables in Java

By Esmail Rahmani

In this tutorial, we will learn what is the atomic variable, how to use it in Java. When we use one variable in many threads and those threads use that variable concurrency in this.... Read More

How to convert String to BigDecimal in Java

By Krishna Lakhi

Hey Everyone! In this article, we will learn how to convert String to BigDecimal in Java. Before directly getting into the code let us first understand BigDecimal class in Java. Bi.... Read More

How to use transient keyword in Java with example

By Esmail Rahmani

In this article, we will learn what is the transient keyword and how to use it in Java. Also, we will try to understand why we use it. What is the transient keyword? Transient is a.... Read More

Activity Selection Problem using Greedy-method in Java

By Sanskar Dwivedi

There are following  steps we will be taking to solve the activity selection problem using Greedy method in Java, 1: Sort the activities in ascending order according to their fini.... Read More

Java Annotations Tutorial

By Esmail Rahmani

In this tutorial, we will learn what is annotations, how to use it in Java and how to create your own custom annotation. Annotation is a kind of information to provide data from a .... Read More

How to find the longest line in a text file in Java

By Shubham Kumar

In this tutorial, we are going to witness how to find the longest line in a text file in Java. If you don’t know how to do it then, you are in the right place to know your pr.... Read More

Check if a string is empty or null or not in Java

By Esmail Rahmani

In this tutorial, we will learn how to check if a string is empty or null or not in Java. We call string is empty when it has length zero or have value  “”   it mean.... Read More

Java String endsWith() Method

By Esmail Rahmani

In this topic, we will learn how to use endsWith(String suffix) method in Java program. this method is under java.lang package and it exists in String class. This method uses to ch.... Read More