Ong 201771010128 "Object-oriented Programming (Java)" First week study summary

Source: Internet
Author: User
Tags create directory garbage collection stack trace

Part I: Course preparation section

Fill out the course study Platform Registration account:

Platform Name

Registered Account

Blog Park: www.cnblogs.com

The night sky Fu said

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

[Email protected]

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

Wylfu

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

2326669056

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

Chapter One: The first time we touch Java.

A:java Programming Platform: Java is a complete platform with a huge library of reusable code and an execution environment that provides services such as security, cross-operating system portability, and automated garbage collection.

Key terminology of B:java's "white paper":

1: Simplicity: Java omitted the concept of operator overloading, multi-inheritance and other fuzzy concepts, and by implementing automatic garbage collection greatly simplifies the memory management work of the program designer.

2: Object-oriented: The Java language is designed to focus on the object interface, which provides a simple class mechanism and a dynamic interface model.

3: Distributed: Includes the operation part and the data part, the operation part refers to one can arrange the related operation on several different hosts, the data part also can store the data on many different hosts.

4: Robustness: Mainly in the handling of the exception above, the exception of the 3 categories: Check the exception, run an exception, error, when the exception occurs, the JVM will terminate the program before the call stack trace information printed out.

5: Security: Java removes syntax like pointers and memory releases in C language. All memory operations are handled by the JVM, eliminating the illegal operation of the memory.

6: Architecture-neutral: The Java interpreter generates an architecture-independent bytecode directive that Java programs can run on any processor, as long as the Java Runtime system is installed.

7: Portability: Platform-independent features enable Java programs to be easily ported to different machines on the network.

8: interpreted: The Java interpreter interprets the Java bytecode directly. The bytecode itself carries the information at compile time, making the connection process simpler.

9: High performance: Unlike other interpreted languages such as BASIC,TCL, Java bytes are designed so that they can be converted directly to the machine code corresponding to a specific CPU, resulting in higher performance.

10: Multithreading: Java Multithreading is the program at the same time to perform multiple tasks in parallel, and the corresponding synchronization mechanism to ensure that the correct sharing of data between the threads.

11: Dynamic: Java design makes it suitable for a growing environment, in the class library can be free to add new methods and instance variables without affecting the execution of the user program.

Chapter II:

(1) This chapter mainly describes how to install the Java Development Kit (JDK) and how to compile and run different types of programs;

(2) Console programs, graphical applications, and applets.

(3) The way to run the JDK tool is to type the command in the terminal window.

Part III: Experimental part

    1. Experiment Name: Experiment one 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) familiar with the basic steps of developing Java programs using Elipse integrated development Environment

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

3. Experimental Steps and Contents:

Lab One: Installation and environment configuration of JDK

(1) download install JDK on my Computer Find Advanced properties Settings Entry configuration

(2) Click on the environment configuration to get:

(3) by environment variable, new, enter variable name: java-home-and Variable Value C:Program files/java/jdk/10-2, press OK

(4) As with the above and (3), simply change the variable name and the value of the variable.

(5) When the variable name is classpath, the value of the variable is%java_home%\bin. After the configuration is complete, press Windowin and R key at the same time, input: cmd, enter end, get below.

A: enter Java and press ENTER.

Experiment 2 Download the textbook Sample package

links to download Web pages: http://horstmann.com /corejava. html, file name:corejava.zip(download version 10)

Experiment 3 run the following program from command-line compilation

Follow the experimental steps below:

(1) Create directory C: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).

(3) Save the program. Note: When you save the source program, the program name is the same as the main class name.

(4) Compile the program after the directory d:\java> input welcome can run through the compiled program. The results are as follows

(5) Running the program

in the catalog C:d:/java after the input welcome can run through the compiled program.

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

Experimental Questions 4 developing helloworld! with the JDK command line Program

(1) First create Notepad, as shown in:

(2) Operation result

Experimental Questions 5 Download and use the elipse integrated Development Package

Download URL:http://eclipse.org

Follow the steps to complete the download and install the Elipse. For example, first press the Crtl+n key, build Notepad, write the program, such as :

Run the results as shown in:

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

write the 99 program as shown in :

The compilation results are as follows:

4. Experiment Summary: We first contact Java, through the teacher's first class of simple introduction and read the textbook, understand that Java is a complete platform, there is a huge library, It contains many reusable code and an execution environment that provides security, portability across operating systems, and automated garbage collection. In the help of seniors, basically completed the environment configuration and the experiment, of course, encountered a lot of problems, to seek the help of the roommate, the first week of school to experience staying up late, but also really understand and understand the hard behind the professional. Therefore, our self-learning and hands-on ability entirely on their own, in the future study, class seriously listen to, and students to ask questions, to seek help is essential. In the teacher's advice to download a few learning platform and software, usually need to learn the Java language in time.

Ong 201771010128 "Object-oriented Programming (Java)" First week study summary

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.