JAVA PROGRAM METHODS
1.Download the application file of java.
2.Click here to download java(jdk).
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 additon file.
Addition.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 Addition.java
12.Then automatically create class file now check in the:- C:\Program Files\Java\bin.
13.Then run the program write command : java Addition
14.Your program is successfully run.....
ADDITION PROGRAM
Addition.java
public class Addition
{
public static void main(String args[])
{
int a=10;
int b=20;
int c=a+b;
System.out.println("Addition is"+c);
}
}
//***************************************************************
END OF PROGRAM
//***************************************************************
0 comments:
Post a Comment