Makai 201771010116 "Object-oriented Programming (Java)" First week study summary

Source: Internet
Author: User
Tags create directory

Makai 201771010116 the Object Oriented Programming (Java) " first week study summary

Part I: Course preparation section

Fill in the Course Learning Platform Registration account,

Platform Name

Registered Account

Blog Park: www.cnblogs.com

The leisure is fleeting.

Program Design Evaluation: https://pintia.cn/

[Email protected]

Code Hosting Platform: https://github.com/

Xiaoqianliunian

Chinese University mooc:https://www.icourse163.org/

17393164810 (mobile number)

The following answer is yes or no

Whether to join the Course Class blog group

Is

Whether to join the course QQ Discussion Group

Is

Part II: Theoretical Knowledge Learning Section

(1) Understand the Java programming environment.

(2) Learn the main contents of the Java programming environment.

(3) Understand the key terminology of the Java White Paper (simplicity, object-oriented, distributed, robust, security, architecture-neutral, portability, interpretive, high-performance, multi-threading, dynamic).

(4) Understand Java applets and Internet,java development history, common misunderstanding in Java.

(5) Mastering the installation of JDK and setting process of environment variable;

(6) Master the basic commands and procedures for developing Java programs using the JDK.

(7) Compile and run a simple Java program using the JDK.

(8) Edit, compile, run, and debug Java programs.

(9) Preliminary study of the basic steps of developing Java programs using the Eclipse integrated development environment.

(10) Use the C language knowledge to run simple programs in the Java environment.

Part III: Experimental part

    1. Experiment name: Experiment a Java programming environment

2. Purpose of the experiment:

(1) Mastering the installation and configuration of JDK;

(2) Master the basic commands and procedures for developing Java programs using JDK;

(3) The basic steps of developing Java programs skillfully using ELIPSE integrated development environment

(4) Master the basic syntax of the Java program.

3. Experimental Steps and Content

(1) Download the appropriate version of the JDK on the official website

Go to the following page and click on the first icon below JDK (dowlnlooad)

Pop up the following page, tick Accept License agreemen, Select the version of Windows, download

After the download is completed, install the following, the installation path is usually the default computer C drive

After the installation is complete, the following address is found from the installation path and the following folder appears, indicating that the installation was successful

After the installation, the environment variable configuration, the steps are as follows, open My Computer-system Properties-System Information-Advanced system settings-environment variables

In the "Environment variables" pop-up "system variables" click on the New button to establish the first variable, the variable name (CLASSPATH), the value of the variable is (.; %java_home%\lib;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar), click OK

Create a second variable named (java_home) with the variable value (C:\Program files\java\jdk-10.0.2), which can be entered directly from the browse directory (that is, your JDK's installation directory).

Path is edited for environment variables, new two paths (%java_home%\bin), (%java_home%\jre\bin)

After the environment test is completed, windows+r open a command prompt (console), enter Java and javac The following page describes the configuration success

Experiment 2 Download the textbook sample package

Download Web link: http://horstmann.com/corejava.html, file name: Corejava.zip

Experiment 3 Run the following program from command-line compilation

Follow the steps below to experiment

(1) Create directory D:\java. Use this directory as the working directory for the experimental program of this course. Java source code, compiled bytecode files are placed in this directory.

(2) Start a text editor (such as WordPad, Notepad, etc.) to copy the following source code. The 2nd chapter of the textbook is the sample program (Welcome.java).

/**

* This program displays a greeting for the reader.

* @version 1.30 2014-02-27

* @author Cay Horstmann

*/

public class Welcome

{

public static void Main (string[] args)

{

String greeting = "Welcome to Core java!";

System.out.println (greeting);

for (int i = 0; i < greeting.length (); i++)

System.out.print ("=");

System.out.println ();

}

}

(3) Save the program. Note: When you save the source program, the program name is the same as the main class name. So use Welcome.java as the file name of this program. If you are writing a program in Notepad, the default extension for Notepad is. txt, so you want to enclose the file name in quotation marks. Save the file in the directory D:\java.

(4) Compile the program

After directory d:\java>, enter the following command to compile the source program into a bytecode program

Javac Welcome.java

If the compilation succeeds, the bytecode file Welcome.class is generated in the D:\java directory. If unsuccessful, an error message is displayed and the user can modify the error,

(5) Running the program

After the directory d:\java>, enter Welcome to run the compiled program.

(6) Observe the program running results and understand the Java Basic program structure.

Lab 4 developing helloworld! with JDK command line Program.

Create a new. txt document on the desktop named Helloworld.java, which does not hide the suffix name and enters the following code.

public class HelloWorld

{

public static void Main (String[]args)

{

System.out.println ("Hello java!");

}

}

Save the document to the D drive, then run cmd, enter D: Enter D, and then enter Javac Helloworld.java, after success will appear under the original text HELLOWORLD.CALSS document, the interface is as follows

After the last successful operation, the output helloworld!

Experiment 5 Download Elipse integrated development Package

Download URL:https://elipse.org download and install

Experimental Questions 6 output 99 multiplication table using the Elipse development program

Once eclipse is installed, set up the workspace first

Then create the Java project file

Edit the following program

/**

* @version 10.0.2 2018-09-02

* @author Makai

*/

Package test1;

public class CFB

{

public static void Main (String[]args)

{

for (int i = 1;i<=9;i++)

{

for (int j = 1;j<=i;j++)

{

System.out.print (j+ "*" +i+ "=" + (i*j) + "\ T");

}

System.out.println ();

}

}

}

The results of the operation are as follows:

Experiment Summary:

From the C language of last semester to the Java, the feeling is still a big change, through a week of contact with Java, Java also has a preliminary understanding. First two chapters of the text of the book in detail, the main content of the Java programming environment has mastered, but also the key to Java programming has been understood, and then according to seniors in the Learning group issued by the document and so on the Java environment configuration process has been understood, As well as on the Web page on the Java environment configuration of some information, and then on their own computer configuration, in the course of the configuration of the main encountered the following issues, the installation address is not clear resulting in multiple detection errors, variable value in the input process of the small sign of the leakage; There was a small error in creating the project file after Eclipse was installed. Through this experiment on the computer has a new understanding, feel their computer level has risen a step, later in the computer system to carry out some advanced operation, in the future study, through the teacher's Professor My computer technology will have a greater ascension, also in this experiment understand encountered problems is not disorderly hands and feet, It is important to calm down and find the wrong place, so that we can acquire more skills to enrich ourselves and improve ourselves.

Makai 201771010116 "Object-oriented Programming (Java)" First week study summary

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.