Posts from Java

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

How to remove blank lines from a text file in Java

By Ayush Sanghavi

Hi, today’s tutorial is about how to remove blank lines from a text file in Java. Imagine, you have a huge text file running into thousands and thousands of characters with a.... Read More

Count Number Of Occurrences Of A Word In A Text File In Java

By Shubham Kumar

In this tutorial, we are going to figure out how many times a word is repeated in the text file using a map interface method through a Java program. If you don’t know how to .... Read More

Read and Write Image file In Java

By Sanjay Adhikari

In this tutorial, we will find out the way to Read and Write images in Java. For performing read and write operation we will import multiple classes. There are two ways to read and.... Read More

Collatz Conjecture in Java with Processing

Collatz Conjecture in Java with Processing

By Sai Ram | October 28, 2019

Hi coders, today we will discuss Collatz conjecture in Java. Imagine something simple yet complicated to prove that it’s simple. Today we’re talking about such a fuzzy problem which breaks your mind finding the proof – The Collatz Conjecture. Collatz was first to identify such a fatigue-causing problem. Which simply stated that If a number […] Read More

Take only Integer input from user in Java

By Krishna Lakhi

Hey Everyone! In this article, we will learn about how to accept only Integer input from user in Java. So let’s get started. There are several ways in which we can prompt the.... Read More