Looking more closely "Welcome"


Applications Home has four components, namely:

    
definition package (package)
    
comment
    
class definition (class)
    
main method




Let us discuss one by one.





Definition package 


(package)Package in Java is a collection of various codes are summarized in a single package. For ease of writing and sharing logic of a program, a package is divided into several files (files) in which each file has a function or a very specific task, such as a file function to declare constants and classes, while another file contains the implementation classes and procedures.In the example above SelamatDatang applications, this package contains only one file whose contents consist of one class and one method.The definition of the package is not always necessary, but this is a good habit to train us to think logically and systematically. 


Comment 

Comments will not be processed by the compiler but is useful for other programmers. Java language has three kinds 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 * /. The tools javadoc will process comment documentation to make the documentation automatically from the source program.

    
/ / Text - The compiler will ignore everything from / / until end of line.

Class Definition

 Classes are an integral part of the Java language because Java is an object-oriented language. Each application must consist of one class. Here we define the class welcome as the main class.
  
Main Method 

In the Java programming language, each application must have one main method that looks like the following:The method is similar to the function main play in the language C / C + + where this function is a gateway started a program. Main methods can be invoked by including the variable, either only one variable, a lot of variables or even none at all.The latter is the following command to display the Welcome on your computer. 


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

Read Users' Comments (0)

0 Response to "Looking more closely "Welcome""

Post a Comment