Java Lab report One: Familiarity with the Java development environment

Source: Internet
Author: User

Experimental requirements:

1. Compiling and running a simple Java program using the JDK

2. Edit, compile, run, and debug Java programs using Eclipse

Experimental content

(i) Java program Development under command line

(ii) Development and commissioning of Java programs under Eclipse

(iii) exercises (implemented via command line and Eclipse two, practice debugging under Eclipse)

3. Implement the Caesar password and test

Experimental process

Experiment One:

Open the command line through the Xface software by running the window, via the command line, by gedit the file name. java, or vim file name. Java, into the Java program's codec interface.

After writing the code saved, pass the javac-d. File name. java compiler program. Enter Java Scn.hello run the compiled program

Experiment Two:

Programming with Eclipse. Note To save the established class to the package folder. Write the development process. Focus on debugging the program, click Window->Open Perspective->Debug Open Debug View.

Set breakpoints, and in front of where you want to set breakpoints, double-click the section that precedes the number of rows to set breakpoints quickly.

debugging shortcut keys are F11, single-step debugging, enter the function shortcut key is F5, do not enter the function shortcut key F6, general debugging do not enter the function, when the function problem, then enter the function.

To debug at a specified location, use the Resume function of the shortcut key for F8.

You can view the value of a variable at this time by moving the mouse over the variable.

Conditional breakpoints, which are typically used in loop statements. Right-click on the left side of the statement line you want to debug, and select Breakpoint Properties...”, enter required loop condition

Experiment three: Implement Caesar's password and test it

The problems encountered in the experiment and the solving methods

Experiment One:

No problems encountered,

Experiment Two:

No other technical problems were encountered while doing the experiment. Learned how to use debug, harvest quite abundant.

Experiment Three:

Some of the statements are not very useful, and finally refer to the online program with their own understanding of the program, to Java or not too familiar with the need for more practice.

Experimental Harvest

Learn how to use Debug, learn more about Eclipes, train the use of statements, The Harvest is quite abundant

Java Lab report One: Familiarity with the Java development environment

Related Article

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.