java

java

How to use pi value in Java with example

Learn to use pi value in Java with example. PI is defined in the Math class or java.lang.Math class in Java. Learn how to import it from this class.

Read
java

How to import math class in Java example

How to import math class in Java. Math class is defined in the java.lang package. This post will show you how to import math class in a Java program and how to use its properties and methods.

Read
java

Java program to check if a number is a tech number or not

Java program to check if a number is a tech number or not. This program will take one number as input from the user and check if it is a tech number or not.

Read
java

Java array copyOfRange method explanation with example

Java array copyOfRange method explanation with example. copyOfRange method is used to copy a specific range of array to a new array in Java. This post will show you how to use copyOfRange with examples.

Read
java

Java program to find the average of two numbers

Java program to find the average of two numbers. This program will take the numbers as inputs from the user and print the average value.

Read
java

How to take a string with blank spaces as input in Java

Learn to take inputs of strings with blank spaces in Java. We can use the nextLine() method of the Scanner class to take a string with blank spaces as inputs.

Read
java

Java program to check if a number is valid IMEI or not

How to check if a number is valid IMEI or not in Java. The program will take one number as input from the user and print if it is a valid IMEI or not.

Read
java

How to convert miles to kilometers and kilometers to miles in Java

Java program to convert miles to kilometers and kilometers to miles. The program will take the value as input from the user and do the conversion.

Read
java

Java convert string lowercase to uppercase without using any library function

Java program to convert lowercase to uppercase without using any library function. We will write a program that will take a string as input and convert all lowercase characters to uppercase.

Read
java

How to remove the last character of a string in Java

Java program to remove the last character of a string. We will learn two different ways to do that. By converting the string to a StringBuilder object and by using the prebuilt substring method.

Read