In this Java Tutorial we will go over details on how to use HashMap's below methods: clone()putIfAbsent(K key, V value)computeIfAbsent(K key, java.util.function.Function …

## java basics Archives...

## How to find Diameter, Area and Perimeter (Circumference) for a Circle in Java?

What is Circle? A circle is a round shaped figure that has no corners or edges. If you have a radius for a circle, you could easily find out Area, Diameter and Circumference for a Circle. Here …

Read Article about How to find Diameter, Area and Perimeter (Circumference) for a Circle in Java? →

## How to Find Factorial of a given number using recursion in Java?

What is a factorial number? In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. Here is a simple program …

Read Article about How to Find Factorial of a given number using recursion in Java? →

## What is Floyd’s Triangle? How to print Floyd’s Triangle in Java?

What is Floyd's Triangle? Floyd's triangle is a triangular array of natural numbers, used in computer science education. Each number in the triangle is smaller than the number below it by the …

Read Article about What is Floyd’s Triangle? How to print Floyd’s Triangle in Java? →

## How to check if Number is Odd or Even in Java?

Here is a very simple Java example which tells you if given number is Even or Odd. Java Program to check Even or Odd number. Even odd program in Java. An even number is a number that can be …

Read Article about How to check if Number is Odd or Even in Java? →

## Log File Tailer (tail -f) implementation in Java – Best way to tail any file programmatically

File operations using Java are my favorite part. There are number of tutorials you may have seen on Crunchify like append data to file, read data from file, read and parse JSON file, read …

## Java: HashSet Vs TreeSet – Difference between HashSet and TreeSet in Java

While searching solution for my Java exception online found very nice explanation on StackOverflow about some basic difference between HashSet and TreeSet. HashSet is much faster than TreeSet …

Read Article about Java: HashSet Vs TreeSet – Difference between HashSet and TreeSet in Java →

## How to Reverse a String in Java? Total 7 different ways…

On Crunchify, we have published more than 500 Java Tutorials and in this tutorial we will go over steps on how to reverse a string in Java? There are 7 different ways you can reverse a string in …

Read Article about How to Reverse a String in Java? Total 7 different ways… →

## How to Check if Number is Prime or not in Java? How to Generate and Print first N Prime Number?

What is Prime number? As per definition, Number which is greater than 1 and has only 1 divider which is itself is called Prime number. Other numbers are called Composite Number. Let's take a …