JAVA PROGRAM METHODS
1.Download the application file of java.
3.Install the jdk file.
4.Write the java program on notepad.
5.Save the file in java application.
6.Wrote the file name is correct.
for ex.we can save the Subtraction file.
Subtraction.java
7.Save the program:- C:\Program Files\Java\bin.
8.Then open the command prompt (cmd).
9.Then type the cd\
then type cd program files
then type cd java
then type cd bin
10.Now we are going in the:- C:\Program Files\Java\bin.
11.Then compile the program,then type javac Subtraction.java
12.Then automatically create class file now check in the:- C:\Program Files\Java\bin.
13.Then run the program write command : java Subtraction
14.Your program is successfully run.....
SUBTRACTION PROGRAM
{
public static void main(String args[])
{
int a=10;
int b=20;
int c=b-a;
System.out.println("Subtraction is"+c);
}
}
//***************************************************************
END OF PROGRAM
//***************************************************************
0 comments:
Post a Comment