This Post is written for L.L.J Series.
This is How You Can Run Your First Program in Java.
1. Install JDK.It Can Be Found Here.
2. Use a IDE (I am Using Notepad Here)
3. Write Your First Program and save it in:
C:/java/jdk/bin
4. Make Sure You Save The File With Same Name as Main Class File.
e.g:
We are Writing The Code:
We Will Save the Following Program with Name: Sample.java
First Run Command Prompt and Navigate to C;/java/jdk/bin.
Now,Run the Program using These Commands:
Congrats! You have Just Executed Your First Java Program.
Enjoy...
This is How You Can Run Your First Program in Java.
1. Install JDK.It Can Be Found Here.
2. Use a IDE (I am Using Notepad Here)
3. Write Your First Program and save it in:
C:/java/jdk/bin
4. Make Sure You Save The File With Same Name as Main Class File.
e.g:
We are Writing The Code:
class Sample
{
public static void main(String s[])
{
System.out.println("Tech_Labs.java");
}
}
We Will Save the Following Program with Name: Sample.java
First Run Command Prompt and Navigate to C;/java/jdk/bin.
Now,Run the Program using These Commands:
javac Sample.java
java SampleCongrats! You have Just Executed Your First Java Program.
Enjoy...