Below is the code for a simple java program to get you started.
Below is the code for a simple java program to get you started.
class FirstProgram
{
public static void main(String args[])
{
System.out.println(”This is the first java program”);
}
}
Save the above code with the file name as: FirstProgram.java
Now, Compile the program on command prompt with the following command:
javac FirstProgram.java
Execute the code with the command:
java FirstProgram
Now you should get the output on command prompt as:
This is the first java program. fir
Welcome to Authspot, the spot for creative writing.
Read some stories and poems, and be sure to subscribe to our feed!