Experiment with familiarity with a Java development environment

Source: Internet
Author: User

Experiment contents and steps (i) compiling and running a simple Java program using the JDK

Compile and run: Enter javac-d. Hello.java command to compile the code, enter the Java LJP. Hello command Run (note change to your own information)

Information to run:

(ii) idea under the Java Program development, debugging

To set a single-step breakpoint:

To set a conditional breakpoint:

(c) Small exercise

Title: 3. Implement Fibonacci sequence function and test (normal, abnormal, boundary condition)

Normal Condition:

Exception Condition:

There is no output, because there is no possibility of negative conditions.

Boundary condition: After analysis, it is found that this experiment is not necessary.

Encounter Problems and Solutions:

Q: First of all I don't know how to enter a number like C language.

Scanner console=New Scanner (system.in);

  

Q: Second, the idea is not too clear to know how to judge the conditions so that the sequence output.

A: Through Baidu to get conditional judgment statement:

if ((i+1)%10==0)}
Statistics PSP (Personal software Process) Time:
Steps Take Percentage
Design 30 30%
Code implementation 20 20%
Test 20 20%
Analysis Summary 30 30%

Experimental summary

Gradually using Java to solve the problem of simple mathematics, the sense of Java has a new interest and understanding, but there are many to add to the place, should go back to review the contents of the previous chapters, more consolidation of knowledge points.

Experiment with familiarity with a Java development environment

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.