20145216 Shi-Yao's first experimental report on Java programming

Source: Internet
Author: User

Experiment with the familiar (Linux + Eclipse) content of a Java development environment 1. Compile and run a simple Java program using the JDK; 2. Edit, compile, run, and debug Java programs using Eclipse. Experimental requirements 1. Students who do not have a Linux base are advised to start with the Linux Basic Primer (new version), Vim Editor course; 2. Complete the experiment, write the experiment Report, the experiment Report template see QQ Group, pay attention to the experiment report focus is the running result, encountered problems (tool find, installation, use, program editing , commissioning, operation, etc.), solutions (empty methods such as "Check Network", "Ask classmates", "reading" and so on all get 0 points) and analysis (from which can get what revelation, what harvest, lessons, etc.); experimental knowledge point 1. Installation location and difference of JVM, JRE, JDK, 2. command line run JAVAC;JAVA;JAVAC-CP; Java-cp;3. Path,classpath,sourcepath setting method and application; 4. Package management: package;import;javac-d; 5. Eclipse (Netbeans) manages Java projects, debugging: breakpoints, stepping, etc.; 6. Java basic syntax: type and type conversion; variables; operators; flow control etc; 7. The use of the JDK help documentation. Experiment Step (i) Java program Development under command line

1. Install the JDK first:

2. Create a new text document in the specified folder and change the suffix. txt to. Java:

3. The. class file appears in the folder after compilation:

4. Run the results below the command line:

(ii) Commissioning and development of Java programs under idea

1. Run the Hello program:

Code:

Results:

2. Run the HELLOJDB program:

Code:

Results:

(iii) Exercise: Implement arithmetic and Test.

Code:

Results:

Experiment Experience

The first Java experiment is mainly to let us familiar with the Java development environment, because the first week has completed the installation of the JDK, the efficiency of the experiment is therefore high, the main time is put on the exercise above, the first time of their own programming, found not so easy to imagine, although has knocked many code, But when the DIY, still encounter a lot of problems, finally through the Internet to check the data, and finally successfully write the code out.

PSP (Personal software Process) Time:

Steps Time Consuming percentage
Demand analysis 10min 8.3%
Design 30min 25%
Code implementation 60min 50%
Test 20min 16.7%

20145216 Shi-Yao's first experimental report on Java programming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.