20,1.7.3 use eclipse to develop and run Java programs

    1.7.2 in total have shown how to create a Java project, started developing Java programs, we must first create a Java class, right-click on the src directory to build a Java class.

 

Description: This is inside a package, we did not set up, followed by prompt default, the concept of this package, we are involved in the follow-up to, during the explanation.

 

Upon completion you can see what page (includes automatic code generation)

 

    We go to observe the file path, you can see, there is a file called welcome.java under our src directory, return to parent directory, go to the bin directory, we can also see a welcome.class called bytecode file, which shows , eclipse in the process of writing our code will automatically compile java files generated .class bytecode files.

 

 

Written in Java source code, written after click Save (or shortcut keys Ctrl + S)

 

Right-click in the code area, RunAs - "Java Application, in the console to console, see the results, to see whether the code execution.

 

Guess you like

Origin www.cnblogs.com/zglbt/p/11331110.html