Friday, March 1, 2013

Welcome "JAVA"

Currently,i'm also learning about JAVA on campus Stimik "AMIKOM" Yogyakarta, I post about java to learn as well, let's learn together.


 Applicability Welcome has 4 (four) components:
    
definition package (package)
    
comment
    
class definition (class)
    
method of play    welcome package;


 
welcome {public class
 
/ *** @ Param args* /public static void main (String [] args) 

{/ / TODO Auto-generated method stubSystem.out.println ("Welcome!");}
 
}


 Let us discuss one by one.
 Definition package (package)selamatdatang package;Package in Java is a collection of the various codes are summarized in a single package. To facilitate the writing and distribution of the logic of a program, a packet is divided into multiple files (file) where each file has a function or a very special task, such as a file function to declare constants and classes, while the other file contains the implementation classes and procedures.In the example above SelamatDatang applications, this package only contains one file whose contents consist of one class and one method.Definition packages are not always necessary, but it is a good habit to train us to think logically and systematically.Comment

/ *** @ Param args* // / TODO Auto-generated method stubComments will not be processed by the compiler but is useful for other programmers. Java language has three types of comments:

    
/ * Text * / - The compiler will ignore words between / * and * /

    
/ ** Documentation * / - This is a comment that is used specifically for documentation. The compiler will ignore the comments from / * to * /. Javadoc tool will process documentation comments to make automatic documentation of the source program.

    
/ / Text - The compiler will ignore everything from / / to the end of the lineClass Definition

Welcome {public class
    
...
}

 Classes are an integral part of the Java language since Java is an object-oriented language. Each application must consist of one class. Here we define Welcome class as the main class.Method of playIn the Java programming language, each application must have one method of play that looks like the following:public static void main (String [] args) {...}

Method of play is similar to the main function in C / C + + where the function is the gateway dimulanya a program. The method can be called to play include variables, either only one variable, many variables or even none at all.The latter is the following command to display the Welcome on your computer.System.out.println ("Welcome!");

The command uses the Java core libraries, the class system.


The computer program is a series of instructions that a computer can work. A job may be simple for humans can not be understood by the computer. Man must give instructions to the computer how to do suatutugas in a programming language. Different programming languages ​​to human language, because the computer requires a more standard rules of what should and what should not be in a programming language. This rule is called the syntax of the language.

The syntax of a programming language is determined by what can be done by a computer, such as loop (iteration), branch (branch), or function. Only a program with correct syntax that can be compiled or interpreted, which in turn can run on a computer. The compiler will give an error message if there is an error in the syntax so that we fix it.

To be a successful programmer, we have to understand in detail the syntax of the programming language that we will use. However, the syntax is only part of the story. We want to create a program that we run in accordance with what we want. This means that the program must be logically correct. Logically correct program is called having the correct semantics.

On this site we will learn about the syntax and semantics of each of the Java programming language. Syntax easily memorized, but the semantics is more like a feeling. For that, try to download and run the program examples so that we can understand how each program works.




0 komentar:

Post a Comment

 
Pratama Master powered by blogger.com
Design by Simple Diamond and Pratama Master