20169204,exp1:Familiar with the Java development environment(Linux+IDEA)

20169204 exp1:<Familiar with the Java development environment(Linux+IDEA)>

Experimental content and steps

  • Use JDK to compile and run a simple Java program

Run the virtual machine, open the linux system;
Go to the code cloud home page and clone your own project. git clone https://git.oschina.net/md2017/GoldDog20169204.git

Enter the project directory using the command to create the folder exp1,

  • mkdir exp1
    Enter the folder after the establishment of .java file,write the program. Compile and run:
  • cd exp1
  • gredit Hello.java

Use IDEA to edit, compile, run, debug Java programs:

  • Open the IDEA, creat a project and write the program

compire and run it, the result is:

Exercise 5: To achieve the correct integer 1-N between all the prime number of the function, and test.

  • experiment procedure
    At first , we order N = 100.
    Code:

operation result:

If you need to enter a natural number to output prime numbers, see the following code:

Problem and Solution in the experiment

How do I re-include a class into the build path in Intellij IDEA?

  • Deal

EDIT: Figured it out myself. Go to Settings>Project Settings>Compiler>Excludes and delete the entry

Code hosting

Experimental summary

step time consuming percentage
Demand Analysis 20 15
Design 30 3/4
Code 60 3/4
Test 10 4/6
Analyzed 30 6/6

posted on 2017-04-17 09:08  游伟青20169204  阅读(160)  评论(0编辑  收藏  举报