Sunteți pe pagina 1din 4

Source code is the source (beginning) of a program.

Initially, a programmer writes a


program in a particular programming language, when he is developing a program. This
form of the program is called the source program, or more generically, source code. To
execute the program, however, the programmer must translate it into machine language,
the language that the computer understands (1s and 0s). Source code is the only format
that is readable by humans. When you purchase or download programs/applications from
internet, you usually receive them in their machine-language format. This means that you
can execute them directly, but you cannot read or modify them.

*** The source code for a work means the preferred form of the work for making
modifications to it.

A file is object/thing on a computer that stores data and available to anyone who needs it.
A Java source file has Java code and .java extension. The .java extension means that the file is
the Java source file.

*** You Java source file name must be exactly that of class name.
Anatomy of a class

When the JVM starts running, it looks for the class you give it at the command line. Then it
starts looking for a specially-Written method that looks exactly like:

public static void main (String[] args) {


// your code goes here
}

Next, the JVM runs everything between the curly braces { } of your main method. Every Java
application has to have at least one class. and at least one main method (not one main per
class; just one main per application).

S-ar putea să vă placă și