Page not found
Search results
Java program to compare two strings
How to compare two strings in Java, i.e., test whether they are equal or not? The compareTo method of ... of its two objects. The method is case sensitive, i.e., "java" and "Java" are two different strings for it. If you wish to compare them ... || []).push({}); Output of program: Download Compare strings program class file. String ...
devyog - 05/12/2019 - 08:42
Binary search in Java
Java program for binary search: This code implements the binary search algorithm. ... System . out . println ( "Enter value to find" ) ; search = in. nextInt ( ) ; ...
devyog - 05/12/2019 - 09:11
Swapping of two numbers in Java
Java program to swap two numbers with and without using an extra variable . ... || []).push({}); Swapping program in Java import java.util.Scanner ; class SwapNumbers ...
devyog - 05/12/2019 - 21:15
Reverse a number in Java
Java program to find the reverse of a number, for example, if the input is 951, the output is ...
devyog - 05/12/2019 - 20:03
Java program to print prime numbers
Java program to print prime numbers, a user input how many of them are required. ... || []).push({}); Print prime numbers in Java import java.util.* ; class PrimeNumbers { ...
devyog - 05/12/2019 - 00:22
Java hello world program
"Hello world" program in Java to display "Hello world" on the screen. How to write hello world rogram in Java? class HelloWorld { public static void ...
devyog - 04/12/2019 - 08:42
Garbage collection in Java
Java program to perform garbage collection: Free memory in Java virtual machine is printed, and then garbage collection is done using the ...
devyog - 05/12/2019 - 18:51
How to take input from a user in Java
Java program to get input from a user, we are using Scanner class for it. The ... we print them on the screen. Scanner class is present in "java.util" package, so we import this package into our program. We create an ...
devyog - 01/12/2019 - 08:56
Bubble sort in Java
Bubble sort in Java to sort numbers of an array in ascending/descending order. Bubble sort program in Java import java.util.Scanner ; class BubbleSort { ...
devyog - 05/12/2019 - 20:40
Armstrong number in Java
Java program to check if a number is Armstrong or not, it is a number that is equal ... || []).push({}); Armstrong number program in Java import java.util.Scanner ; class ...
devyog - 05/12/2019 - 00:30