Running a Program

 

Python

Java

 

A Python program can be run as a script from a command prompt, as follows:

 

> python helloworld.py

 

 

 

 

 

 

 

 

Syntax and type errors are caught at run time.

 

 

A Java application must first be compiled, as follows:

 

 

> javac HelloWorld.java

 

 

The byte code file can then be run as follows:

 

 

> java HelloWorld

 

Syntax and type errors are caught at compile time.  All other errors are caught at run time.

 

Previous

Index

Next