How to check if file exists in on file system? Sometime at runtime, you may have to find a file and make sure that exists before executing or running any command. You don't want to get an …

## java basics Archives...

## 5 different ways to Download a File from any given URL in Java?

In Java how to download files from any given URL? This tutorial works if you have any of below questions: Download a file from a URL in Java.How to Download a File from a URL in JavaHow to download …

Read Article about 5 different ways to Download a File from any given URL in Java? →

## HashMap’s clone(), putIfAbsent(), computeIfAbsent(), computeIfPresent() Methods in Java (Examples)

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 …

## 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 →