Category
- Php
- JAVA
- DOTNET
- Vbscript
- C
- vb
- html
- Mysql
- Oracle
- sql
- Db
- Computer
- Commerce
- Business
- Arts
- Cashier
- Audit
- Banking
- Accounts
- Math
- Physics
- Biology
- Others
Home >> Asked Questions >> JAVA
Q. How to run java projram ?
Answer :
Step - 1 Create a new Folder "java_program"
Step - 2 Create a new file MyFirstProgram.java" and save into the folder "java_program" and paste the given below code into the file
public class MyFirstProgram
{
public static void main(String[] args)
{
System.out.println("This is my First Java Program");
}
}
Step - 3 Open Command Prompt (Dos) cd\
Step - 4 C:>cd/java_program
Step - 5 C:> javac MyFirstProgram.java
Step - 5 C:>java MyFirstProgram
Step - 2 Create a new file MyFirstProgram.java" and save into the folder "java_program" and paste the given below code into the file
public class MyFirstProgram
{
public static void main(String[] args)
{
System.out.println("This is my First Java Program");
}
}
Step - 3 Open Command Prompt (Dos) cd\
Step - 4 C:>cd/java_program
Step - 5 C:> javac MyFirstProgram.java
Step - 5 C:>java MyFirstProgram
Posted By : aman
Most Viewed Questions