Running a .java file
Lets know how to run a program written in java. For this you need to take the following steps:-
1) J.D.K(java development kit) which you can download from www.sun.com
2) Then go to 'command prompt(cmd)' from start>run>cmd
3) Then give the path wher you have installed J.D.K. and type
(edit
4) Then type the program
5) Then type (javac
6) If the program is executed successfully then type
(java
------------------------------------------------------------------------------
Filename
------------------------------------------------------------------------------
class demo1
{
public static void main (String ar[])
{
System.out.println("Hello World");
}
}
Result:
Hello World
-------------------------------------------------------------------------------

No comments:
Post a Comment