Posts from Java

How to find the nth prime number in Java

By Aditya Rai

In this program, we will find the nth prime number using java. For this, we are importing the Scanner class. Importing the scanner class: import java.util.Scanner; Now we use this .... Read More

Rock, Paper, Scissors game in Java

By Tanisha Saxena

In this tutorial, I will show you how to create rock, paper and scissors game using java. For this game, we will need two players whose choices are independent of each other. Each .... Read More

Implementing Array Linear List in Java

By Utkarsh Tiwari

Hey Folks, In this tutorial, we will learn how to implement Array Linear List in Java and perform functions like add, delete and show in array linear list. So let’s begin. We.... Read More

How to print deck of cards in Java

By Tanisha Saxena

In this tutorial, we will see how to print a deck of cards using Java. As we all know, there are 52 cards in the deck. Each of the card has a rank and belongs to one of the four su.... Read More

Removing White spaces from a String in Java

By Akash Tripathi

Hello Folks, Today we will learn to remove unnecessary whitespaces from a string in Java. Remove extra whitespaces from a string in Java So, making clear what we intend to do let&#.... Read More

Generate random hex color code in Java

By Tanisha Saxena

In this tutorial, we will see how to generate random hexadecimal color code in Java. Colors are specified using hexadecimal values. It is in the form of a hex triplet, which repres.... Read More

Removing Double Quotes from a String in Java

By Akash Tripathi

Hello programmers, today we will be looking on how to remove double quotes in a given string in Java. Now, there may be several ways to do so, One might think of iterating over the.... Read More

OTP Generation in Java

By Tanisha Saxena

In this tutorial, I will show you the program to generate a random OTP in java. They are a unique pattern of numbers of a defined length, used for security purposes. For instance, .... Read More

Related Posts