Posts from Java

Count the prime numbers in a certain range in Java

By Akash Tripathi

Hey folks, today we will see how to count the prime numbers in a certain range in Java. For this purpose, we won’t be using any predefined methods and will code the logic fro.... Read More

Enumeration Interface in Java

By Avantika Singh

Hello Learners, today we are going to learn about the use of Enumeration Interface with collections in Java. The Enumeration interface was introduced in JDK 1.0 under Java.util pac.... Read More

Generate Random Music In Java

By Kamalpreet Singh

In this tutorial, we will learn to generate random music using java. This means that we will write a code to play sound using java. We will generate a tune using a sine wave. The n.... Read More

How to convert map to JSON string in Java

By Kamalpreet Singh

In this tutorial, we will learn how to convert Map to JSON String. For this, first of all, we will learn What is the map? Answer. The map contains the values on the basis of keys i.... Read More

Java program to find maximum and minimum element in an Array

By Akash Tripathi

Today we will see how to find the maximum and minimum element in an array in Java. For this purpose, we will use two variables max and min and then compare them with each element a.... Read More

Sum of First n Prime Numbers in Java

By Harshad Lukare

In this tutorial, we will be heading towards writing the Java program to find the Sum of first n Prime numbers. Before moving towards actually writing code first, let’s under.... Read More

How to call non static method from static method in Java

By Avantika Singh

Hello learners, today we will learn how to call a non-static method from a static method in Java with the help of this small tutorial. Method calling in java is easy but when you t.... Read More

Generate PDF from HTML in java

By Kamalpreet Singh

In this tutorial, we will learn how to generate a PDF file from the HTML file in Java programming. HTML helps us to generate web pages. We will create a String variable and store o.... Read More