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