Here we will write a java program to check whether the input year is a leap year or not. Before we see the program, lets… [Read More]
Java Program to find ASCII value of a Character
ASCII is a code for representing English characters as numbers, each letter of english alphabets is assigned a number ranging from 0 to 127. For… [Read More]
Java Program to Multiply Two Numbers
When you start learning java programming, you get these type of problems in your assignment. Here we will see two Java programs, first program takes… [Read More]
Java Program to read integer value from the Standard Input
In this program we will see how to read an integer number entered by user. Scanner class is in java.util package. It is used for… [Read More]
Java Program to Add two Numbers
In this tutorial, you will learn how to write a Java program to add two numbers. We will see three programs: In the first program,… [Read More]
Java program for binary to decimal conversion
There are two following ways to convert binary number to decimal number: 1) Using Integer.parseInt() method of Integer class.2) Do conversion by writing your own… [Read More]
Java Program for Decimal to Hexadecimal Conversion
There are two following ways to convert a decimal number to hexadecimal number: 1) Using toHexString() method of Integer class.2) Do conversion by writing your… [Read More]
Java Program for Decimal to Octal Conversion
In this guide, we will discuss the following two ways to convert decimal to octal in Java. Using predefined method toOctalString(int num) of Integer class… [Read More]
Java program for bubble sort in Ascending & descending order
In this tutorial we are gonna see how to do sorting in ascending & descending order using Bubble sort algorithm. Bubble sort program for sorting… [Read More]
Java program to convert decimal to binary
There are three following ways to convert Decimal number to binary number: 1) Using toBinaryString() method of Integer class. 2) Do conversion by writing your… [Read More]
Java program to get IP address
In this example we are gonna see how to get IP address of a System. The steps are as follows: 1) Get the local host… [Read More]
Java Program to get input from user
In this tutorial we are gonna see how to accept input from user. We are using Scanner class to get the input. In the below… [Read More]
Java Program to find duplicate Characters in a String
This program would find out the duplicate characters in a String and would display the count of them. import java.util.HashMap; import java.util.Map; import java.util.Set; public… [Read More]
How To Convert Char To String and a String to char in Java
In this tutorial, we will see programs for char to String and String to char conversion. Program to convert char to String We have following… [Read More]
How to convert a char array to a string in Java?
There are two ways to convert a char array (char[]) to String in Java: 1) Creating String object by passing array name to the constructor… [Read More]
- « Previous Page
- 1
- …
- 5
- 6
- 7
- 8
- 9
- Next Page »