Page not found
Search results
Java program to get IP address
Java program to print the IP (Internet Protocol) address of a computer system, we use InetAddress class of java.net package, the getLocalHost method returns InetAddress object, which ...
devyog - 05/12/2019 - 19:57
Java program to convert Fahrenheit to Celsius
Java program to convert Fahrenheit to Celsius: This code does temperature conversion ... = window.adsbygoogle || []).push({}); Java temperature conversion program import java.util.* ; ...
devyog - 04/12/2019 - 19:46
Java program to print alphabets
Java program to print letters (i.e., a, b, c, ..., z in lower case) on the screen using a loop. Java program class Alphabets { public static ...
devyog - 04/12/2019 - 09:16
Java program to print prime numbers
Java program to print prime numbers, a user input how many of them are required. Remember, the smallest prime number is 2. We use the sqrt method of Math package, which finds the square ...
devyog - 05/12/2019 - 00:22
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 program asks the user to enter an integer, a floating-point number, and a string, and we print them on the screen. Scanner class is present ...
devyog - 01/12/2019 - 08:56
Binary search in Java
Java program for binary search: This code implements the binary search algorithm. ... ) ; System . out . println ( "Enter number of elements" ) ; n = in. nextInt ( ) ; ...
devyog - 05/12/2019 - 09:11
If else program in Java
The if-else Java program uses if-else to execute statement(s) when a condition holds. Below is a simple application that explains the usage of if-else in Java programming language. In the program, a user input marks obtained in an ...
devyog - 04/12/2019 - 00:32
Interface in Java
Interface in Java: Java interfaces are like Java classes, but they contain only static final ... // methods declaration } Interface program in Java In our program, we create an interface named Info that ...
devyog - 05/12/2019 - 08:26
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
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