I. Familiarity with the Java development Environment-1
1, the experimental requirements:
0 reference experimental requirements;
1 Set up the catalogue of "self-study number EXP1";
2 in the "Self-study number EXP1" directory under the establishment of Src,bin and other directories;
3 Javac,java's execution in the "own study number EXP1" directory;
4 Submit a full screen running Java under command line in Linux or Windows or MacOS, and the result of running contains the information of self-identity such as learning number and so on.
Ii. familiarity with the Java development environment-2
1, the experimental requirements:
Reference http://www.cnblogs.com/rocedu/p/6371315.html
Submit the full screen of the debug settings conditional breakpoint in Linux or Windows or MacOS environment, and fill in the watermark of your own study number.
Other content included in the lab report
At first, because of curiosity to the idea of the Chinese, but cracked only to the menu some options to Chinese, error hints basically no Chinese, and affect the idea of debug in the use of condition unloading load.
After debug has been step commissioning:
After you set the condition i==50 on line 9th, click Run to automate the results to i=50:
Iii. familiarity with the Java Development environment-3
1. Experimental Requirements and topics:
Reference experiment A familiar Java development environment (Linux + Eclipse) http://www.cnblogs.com/rocedu/p/4421202.html (iii) exercise
Submit the Code Cloud link for your exercise project and run the results.
Title: 5. Implements the function of 1-n all prime numbers between positive integers and tests (normal, exception, boundary condition) (Code link))
import java.util.Scanner;public class isPrime { public static void main(String[] args) { System.out.println("请输入一个正整数:"); Scanner scanner=new Scanner(System.in); int N; N=scanner.nextInt(); System.out.printf("1-%d的质数有:",N); for(int j=2;j<=N;j++) { if (zhishu(j)) { System.out.printf("%d,", j); } } System.out.println("\n"); } public static boolean zhishu(int j) { if (j == 1) { return false; } else if(j==2){ return true; } else{ for (int i = 2; i < j; i++) { if (j % i == 0) { return false; } } } return true; }}
Run under the Linux command line:
Run under Idea:
Set when n=100:
Set when N=1:
Set when n=2:
Set when n=0:
20165231 experiment A familiar Java development environment