- Convert Decimal into Binary
In this section, you will learn to convert decimal
number into binary. The java.lang package provides the functionality to
convert a decimal number into a binary number.
-
Convert Decimal to Octal
In this section, you will learn to convert a decimal
number into a octal
number .
-
Convert Decimal to Hexadecimal
In this
section, you will learn to convert decimal data into hexadecimal. The java.lang package provides the
functionality to convert a decimal number into hexadecimal.
-
Convert Binary to Decimal
In this section, you will learn how to convert
binary number into decimal. The java.lang package provides the facility for
converting the data integer into the binary to decimal.
-
Convert Binary to Hexadecimal
In this section, you will learn to convert binary data
into hexadecimal. The
java.lang package provides the functionality to convert the binary data
into hexadecimal.
-
Convert Octal to Decimal
In this
section, you will learn to convert an octal number to decimal. The following
program helps you converts number octal to decimal.
-
Convert Hexadecimal to Decimal
In this section, you will learn to change
hexadecimal number into decimal. The java.lang package provides the
functionality to convert a hexadecimal number into decimal.
-
Convert Hexadecimal number
into Integer
In this section, you will learn to convert hexadecimal data into integer. The java.lang
package provides the functionally to convert the hexadecimal data into an
integer type data.
-
Convert
Hexadecimal into Binary and Long
In this section, you will learn to convert the hexadecimal data into the
binary and long format. The java.lang package provides the functionality
to convert a hexadecimal to binary and long type data.
-
Convert an Integer into
a String
In this section, you will learn to convert an integer type data into a
string type. The java.lang package provides this conversion
functionality through toString() method.
-
Convert a String into an
Integer Data
In this section, you will learn to convert a string type data into an
integer type. The java.lang package provides the functionality to convert
the string type data into an integer type data.
-
Convert a Character into
the ASCII Format
In this section, you will learn to convert a character data into the ASCII
format. The java.lang package provides the functionality to
convert the character data into the ASCII format
-
Convert Character into
Integer
In this section, you will learn to convert the character into a integer. The
java.lang package convert provides the facility to convert the character
data into an integer type.
-
Alphabet Character
Case-Converter
In this section, you will learn to convert a character (uppercase) into a
lowercase character. The java.lang package provides the
functionality to convert the uppercase character into a lowercase character.
-
Convert Character into a
String
In this section, you will learn how to convert a char into a string type
data. The java.lang package provides the functionality to convert a
character into a string.
-
Convert String to Date
In this example we are going to convert string into date.
-
Convert Date to Calendar
In this example we are converting date into
Calendar. Here we are using format method to convert date
into string.
-
Convert Date to Milliseconds
In this example we are converting date into
milliseconds. In
this example we are using getTime() method to get time/date as
long return type.
-
Convert Date to Long
In this example we are converting date into long. In
this example we are using getTime() method to get time/date as
long return type.
-
Convert Date to String
In this example we are converting
date into string. In this example we are using format method to convert
date into string.
-
Convert String to Calendar
In this example we are converting string value into Calendar.
-
Convert Millisecond to Date
In this example we are converting Milliseconds
into
Date.
-
Convert Date to Timestamp
In this example we are converting date into
a timestamp format.
-
Convert Long to Date
In this example we are converting Long value into
Date.
-
Convert Date to GMT
In this example we are converting date into GMT.
-
Convert InputStream to
Byte
In this example we are going to convert input
stream to byte. Here we are going to read input stream
and converting it into bytes. To do so first read the input stream from
dos prompt then store it into an integer. Finally type cast the integer value into byte.
-
Convert
Inputstream to
Bufferedreader
In this example we are going to convert
Inputstream to Bufferedreader.
-
Convert Inputstream to
Outputstream
This discussion shows how to convert an InputStream to OutputStream.
Here we are trying to make understand the conversion of an input stream into an
output stream by taking an example.
-
Convert InputStream to
ByteArray
Here we will learn the conversion of an input
stream into a byte array.
-
Convert
InputStream
to ByteArrayInputStream
In this example we are going to convert
InputStream to ByteArrayInputStream.
-
Convert
Inputstream to File
Here we are showing how to convert an InputStream to
File.
-
Convert String
to Date
In this example we are going to convert string into date We are creating
DateFormat by using SimpleDateFormat .
-
Convert Char to
Byte
This section illustrate the conversion from char to Byte. Here, we are going
to convert a char type variable into byte type variable .
-
Convert
Double to String
This is a simple program based on the package java.lang. This section
learns you the conversion of double into string.
-
Convert
ArrayList to Array
This is a simple program of java util.package. In this section, you will learn
how to convert an Arraylist into an array.
-
Convert
Byte To Hexadecimal
In this section, We are going to convert a byte value into a hexadecimal
number. The package java.lang provides the functionality for this conversion.
-
Convert Boolean to
String
In this section, we are going to convert a Boolean type data into a string.
-
Convert Decimal to
Integer
In this section, you will learn to convert a decimal number into an
integer. The java.lang package provides the functionality to
convert a decimal number to an integer type number.
-
Convert Float into Integer
In this section, we will learn to convert a float type data into an integer.
-
Convert Integer to
Double
In this section, you will learn to convert an integer into a double. The the
java.lang package provides the functionality for converting an integer type data
into a double.
-
Convert Integer to Float
In this section, you will learn to convert an integer type data into a
float. The following programs helps you in converting an integer into a float
type data.
-
Convert Long To Byte
In this section, we are going to convert a long type data into a byte.
The following program provides you the functionality to convert into a long to
byte.
-
Convert String To Long
In this section, we are going to convert string to long. The following
program provides a functionality to convert a string data (integer)
into a long type data.
-
Convert Object to Int
In this section, we are going to learn to convert a numeric string type
Object into a primitive type int and Integer Object to primitive type int. .
-
Convert Object to Double
In this section, we are going to convert an object type data into a
double.
-
Convert Object To String
In this section, you will learn to convert an object to a string. Object
is a class of java.lang package.
-
Convert String To
Float
In this section, you will learn to convert a numeric type string value into
a float.
-
Convert String To Double
In this section, we are going to convert a numeric type string value into a
double. The double supports big-integer value.
-
Convert Number to Binary
In this section, you will learn to convert a number to a binary (0,1). The
given number is a decimal format and the following program to calculate its
binary.
-
Convert
Decimal to Charater
This is the simple program of java.lang package. In this example, we are
going to convert decimal number to its corresponding character.
-
Convert
Decimal to Fraction
In this example, you will learn how to convert decimal number to
Fraction. The following program you convert it into the decimal to fraction
value by using doubleValue() method.
-
Convert
Hexadecimal to Character
In this example, you will learn how to convert hexadecimal to char
number. The following program provides you convert it into the hexa to char
number.
-
Convert Number
to Word
In this example, We are going to convert number to words.
-
Degree Converter
In this example, you will learn how to convert degree to Celsius,
Celsius to Fahrenheit, Fahrenheit to Celsius, Celsius to Kelvin, and Kelvin to
Celsius.
-
Convert Text to
Html
In this section, We are discussing the conversion of text into html file .This
program functionally provides you converting text to html file by using
FileOutputStream. The FileOutputStream() is a constructor.
-
Convert Text to
word
In this example, You will learn how to convert text to word file. Here, we
are going to discuss about the conversion of text to word file.
-
Convert Array to List
In this section, you will learn to convert an Array to
List. This program helps you in converting an Array to List.
-
Convert Array to Vector
In this section, you will learn to convert an Array to
Vector. This program helps you in converting an Array into a
Vector.
-
Convert Collection to Array
In this section, you will learn to convert Collection
data to an Array. This program helps you in converting Collection data to an
Array.
-
Convert Vector to Array
In this section, you will learn to convert Vector to an
Array. This program helps you in converting Vector to an Array.
-
Convert Text To Binary
In this section, we will learn how to convert Text to Binary.
The following program provides you the functionality to convert Text to Binary.
-
Convert Number to String
In this section, we will learn how to convert numbers
to String.
The following program provides you the functionality to convert numbers to
String.
-
Convert String to Number
In this section, we will learn how to convert String to Number.
The following program provides you the functionality to convert String to Number.
-
Convert charArray to String
Lets see how to convert charArray to String.
-
Convert List to ArrayList
In this section, you will learn how to convert List to ArrayList.
-
Convert Time to Milliseconds
In this section, you will learn to convert Time to
seconds. An hour has 3600 seconds, a minute has sixty seconds and a millisecond is one thousand part of a second i.e. an unit for measuring the time.
-
Convert Time to Seconds
In this section, you will learn to convert Time to
seconds. An hour has 3600 seconds and a minute has sixty seconds.
-
Convert GMT to CST
In this section, you will learn to convert a GMT to CST format. The GMT stands for Greenwich Mean
Time and CST stands for Central Standard Time.
-
Convert GMT to PST
In this section, you will learn to convert a GMT to PST format. The GMT stands for Greenwich Mean
Time and PST stands for Pacific Standard Time.
-
Convert GMT to EST
In this section, you will learn to convert GMT to EST. The GMT stands for
Greenwich Mean Time and EST stands for Eastern Standard
Time.
-
Convert GMT to IST
In this section, you will learn to convert a GMT to IST format. The GMT stands for Greenwich Mean
Time and IST stands for India Standard Time.
-
Convert GMT to CET
In this section, you will learn to convert a GMT to CET format. The GMT stands for Greenwich Mean
Time and CET stands for Central European Time.
-
Convert List to Array
Lets see how to convert List to Array.
-
Convert Array to String
In this section you can see how to convert an array to a string or text.
-
Convert Grams To Carats
In this section, you will learn to convert Grams To Carats. The following program helps you in converting Grams To Carats.
-
Convert Meters To Miles
In this section, you will learn to convert Meters To Miles. The following program helps you in converting Meters To Miles.
-
Convert Gallons To Liters
In this section, you will learn to convert Gallons To Liters.
The following program helps you in converting Gallons To Liters.
-
Convert Pounds To Kilograms
In this section, you will learn to convert Pounds To
Kilograms. The following program helps you in converting Pounds To Kilograms.
Convert Kilograms To Pounds
In this section, you will learn to convert Kilograms To Pounds.
The following program helps you in converting Kilograms To Pounds.
-
Convert Grams To Ounce
In this section, you will learn to convert Grams To Ounce.
The following program helps you in converting Grams To Ounce.
-
Convert Grams To Pounds
In this section, you will learn to convert Grams To Pounds.
The following program helps you in converting Grams To Pounds.
-
Convert Miles to
Kilometers
In this section, you will learn to convert Miles to
Kilometers. The following program helps you in converting Miles to
Kilometers.
-
Convert Feet to Meters
In this section, you will learn to convert Feet to Meters.
The following program helps you in converting Feet to Meters.
-
Convert Inches to Centimeters
In this section, you will learn to convert Inches to Centimeters.
The following program helps you in converting Inches to Centimeters.
-
Convert Inches To Meters
In this section, you will learn to Inches To Meters.
The following program helps you in converting Inches To Meters.
-
Convert Liters To Gallons
In this section, you will learn to convert Liters To Gallons.
The following program helps you in converting Liters To Gallons.
-
Convert Grams To kilograms
In this section, you will learn to convert Grams To kilograms.
The following program helps you in converting Grams To kilograms.
Convert Carats To Grams
In this section, you will learn to convert Carats To Grams.
The following program helps you in converting Carats To Grams.
Addition of two Number in Class
In this program we will learn how to calculate any two
number. Java is a object oriented programming language in which uses of
class consists of a collection of type of encapsulation instance variables and type of methods.
The Array Palindrome Number in Java
This is a Java simple palindrome number program. In
this section you will read how to uses palindrome one dimensional array program. The
array palindrome number arrange the array number. This session
provide you the best explanation with the Java source code.
Calculating
Sum of two Multidim
To make this program run we need to declare two
multidimensional array of type int. Firstly calculate the length of the both the
arrays. Now we need to make a matrix out of it. To make the matrix we will use
the for loop. By making use of the for loop the rows and column will get divide.
This process will be performed again for creating the second matrix.
Calculate the
Sum of three Numbers
This is simple java programming tutorial . In this section
you will learn how to calculate the sum of three numbers by using three static
variables.
Changing the value of Array in Java
This is very simple of one dimensional array program.
In this tutorial you will learn how to change array values. The one dimensional
array program is provided Java application program about the explanation with
Java Source code.
Class Average Program
This is a simple program of Java class. In this
tutorial we will learn how to use java program for displaying average value. The
java instances of the class, represent classes and interfaces in a running Java
application. The class declares members instance and static initializes, and
constructors.
Dividing Element of Two Dimensional Array
In this Section we will learn how to get divide of two
matrix. First all to we have to define class "ArrayDivideMatrix". Here you will learn how to use two
matrix array for developing Java
program.
Dividing of two Matrix in Java
In this Section we will learn how to get divide of two
matrix. First all to we have to define class "ArrayDivideMatrix". Here you will learn how to use two
matrix array for developing Java
program.
Matrix Example in Java
This Java programming tutorial you how you can work
with the multidimensional array. Array is the collection of same data type.
Consider that if have created a variable of type int then, the array of int can
only store the int values. It can't store other than int data type.
Three Dimensional Array program
This is a very simple Java program. In this program we
will learn how to use three dimensional array. Firstly, we have to define class
name "ThreeDMatrix" . We are going to create 3 by 4 by 5 program. We
are going to make three dimensional array having multi rows and columns.
Two Dimensional Array
Program Using Nested For Loop
This is a simple Java array program . In this session we will teach how
to make use of a two dimensional array. First of all we will define a class
"Matrix". In this program we are going to make two dimensional array
having three row and three columns.
Two Dimensional Array
Program
This is very simple program of Java. In this lesson we
will learn how to display arrange form of two dimensional array program.
Firstly, we have to define class "TwoDimensional ". We are going to
make a integer for array declaration Two dimensional array program. We are going
to using for loop for performing the five rows and five columns.
Two Element Dividing Number
This is very simple java program. In this section we
will learn how to divide any two number. In java program use the class package.
The class declares members instance and static initialize and constructors. If
you are newbie in java programming then you can understand very easy way from this
example.
String Array
This is simple java string program. In this
section we will learn how to make use of string array. In the java programming tutorial
string, which are widly used in java program for a sequence of character. String
are represents character string. This program are implemented such as
"rose!" as instance of class.
The Arithmetic Operators
In this section we will learn how to calculate
arithmetic operation. The java programming tutorial provide operators that
perform the mathematical values addition, subtraction, multiplication, and
division.
The Relational Operator
This is simple java Relational operator program. In
this section we will learn how to work all relational operation. We are going to
use in java program equally and relational operators determine if one
operand is equal to, not equal to , less then, and greater then operand.
The Unary Operators
In this example we will see how we can make use of the
unary operator. In java we have been provided the unary operators so we should
know how to make use of those operators.
How to calculate area of Circle
In this tutorial you will learn the method of
calculating the area of circle.
In this program you will be taught each and every steps that have used in this
program.
How to calculate area of rectangle
This is simple java program tutorial of rectangle. In this section we will learn
how to calculate area of rectangle. The area of rectangle is specifies an area
in a coordinate space that is enclosed by the rectangle object.
How to calculate area of triangle
In this section we will learn how to calculate area of triangle. We are going to use area of triangle is half of the area of the parallelogram.
Here in this program we will fine the how to the display massage the area of
triangle. The triangle application implement by the three side angle get the
values of triangle.
Prime Number in Java
This Java programming tutorial will be read how to get prime number. First
of all we will define a class "Prime Number". Java
I/O package has a input stream and a output stream in which input stream is used
for reading the stream and memory allocating and the output stream used for
writing bytes. As in this program we are going to insert certain instruction by
creating buffer reader class.
Swap two any numbers
This is a simple Java Oriented language program.
If you are newbie in Java programming then our tutorial and example are
helpful for understanding Java programming in the simplest way. Here we will
learn how to swap or exchange the number to each other. First of all we have to create a class
"Swap". Now, we use the Integer.parseInt(args[o]) and Integer.parseInt(args[1])
methods for getting the integer type values in command line.
Implementing Continue Statement In Java
In this Session you will learn how to use continue
statement. First all of define class "Continue". In this program used I/O package has a input
stream in which input stream is used for reading the stream and memory allcating. As in this program we are going to create a buffer for the string
class.
Multiplication
of two Matrix
This is a simple Java multidimensional array program
that teaches you the method to multiply two matrix. We are
going to make a simple program that will multiply two matrix. Now to make
this program run, you need to declare two multidimensional array of type integer.
Here in this program use two for loops.
Multiplication of Two Number in Class
This section we will learn how to use multiply two
number. A class consists of a collection of types of encapsulation instance
variable and type of method with implementation of those types class that can
used to create object of the class. The class define two public for
declare class name and second instance variable define.
Squaring of two number in Static class
In this section we will learn how to use static method
and how can display multiplication of two any number. The static method use no
instance variables of any object of the class they are defined in example.
Convert a String to Hexa
In the example given below, you will learn how to
convert String to hexadecimal number. This example takes a user input
string and convert in hexa numbers.
Current Comments
2 comments so far (post your own) View All Comments Latest 10 Comments:Good day....I have no comment but please you to have a java source code in one main class of the combination of DecimalToBinary,DecimalToOctal,and DecimalToHexadecimal using inheritance...Thank You...
Posted by Lovely on Saturday, 03.29.08 @ 09:53am | #54643
This is the program of simple calculator.
Here i am using '+','-','*','/'.
/********code of program****/
class SimpleCal
{
public static void main(String a[])
{
String c=a[0];
char choice=c.charAt(0);
int i=Integer.parseInt(a[1]);
int j=Integer.parseInt(a[2]);
int ans;
switch(choice)
{
case'+':
ans=i+j;
System.out.println(ans);
break;
case'-':
ans=i-j;
System.out.println(ans);
break;
case'*':
ans=i*j;
System.out.println(ans);
break;
case'/':
ans=i/j;
System.out.println(ans);
break;
}
}
}
/*********problem**********/
If we use * operator, it is not working.
ex:- java * 5 2
If we use "*" operator, it is working and give output.
So,is it any reason?
I think * is a special operator in java.
Reply me as soon as possible.
Thanks.....
Posted by sandip kanzariya on Friday, 01.25.08 @ 13:50pm | #46111