201771010108 South Korea "object-oriented Programming (Java)" First week study summary

Source: Internet
Author: User
Tags windows x64 windows x86

Part I: Course preparation section

Fill in the Course Learning Platform Registration account,

Platform Name

Registered Account

Blog Park:www.cnblogs.com

Muzilin

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

[Email protected]

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

Hanlamei

China University Mooc: https://www.icourse163.org/

1936203991

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 overview of Java programming

1.1 Java Programming Platform

Java is not just a programming language, but a complete programming platform.

The advantages include: ① has a pleasing syntax and easy-to-understand semantics (not in C + +);

② provides a large class library, including drawing function, network connection function and database function;

The ③ has a security, cross-operating system portability, and an execution environment for services such as automatic garbage collection.

1. 2 Key Terms for the Java White Paper

Simplicity of 1.2.1

①c++ programmers can master Java programming techniques;

②java rejects the content that is seldom used in C + +, difficult to understand, and prone to program errors;

The ③java basic development environment can be run independently in a very small space.

1.2.2 Object-oriented

The Java language is a purely object-oriented language that has the following object-oriented features: ① object: It encapsulates the state variables and relative methods of an objective entity, and realizes modularization and information hiding of the programming.

② class: Provides a prototype of a class of objects, through the inheritance mechanism, subclasses can use the methods provided by the parent class to achieve the reuse of code;

③ encapsulation;

Polymorphism of ④;

⑤ of inheritance.

1.2.3 Network Skills

Java has an extended Network class library that handles TCP/IP protocols such as HTTP and FTP, which makes it easy for Java applications to open and access network objects via URLs, and is the best support for network programming.

1.2.4 Robustness

①java has adopted a secure pointer model that reduces the likelihood of rewriting content and collapsing data;

②java compiler has a strong memory conflict error detection ability, many errors will be found in the compilation phase.

1.2.5 Security

Java requires that all access to memory must be implemented through an instance variable of the object, which prevents the programmer from accessing the object's private members, and avoids the errors that are easily generated by the pointer operation.

1.2.6 Neutral Architecture

Java programs (files that are suffixed with Java) are compiled into an architecture-neutral bytecode format (a file with a suffix of Class) on the Java platform and can then be run on any system that implements the Java platform. This approach is suitable for heterogeneous network environment and software distribution.

1.2.7 Portability

1.2.8 Explanatory type

Java's source program is first discussed by the compiler into bytecode, and then interpreted by the interpreter execution.

1.2.9 High Performance

Although the speed does not exceed the compiler language C, Java bytecode is designed so that it can be quickly and directly converted to the corresponding CPU machine code, which has high performance.

1.2.10 Multi-Threading

Multithreading can lead to better interactive responses and real-time behavior.

Java has given the implementation of multithreading to the underlying operating system or line libraries to complete. The simplicity of multithreaded compilation is one of the main reasons why Java becomes a server-side development language.

1.2.11 Dynamic Nature

Java libraries are free to add new methods and instance variables without any effect on the client.

1.3 Java applets and the Internet

Users download Java bytecode from the Internet and run it on their own machines. Running a Java program in a Web page is called an applet. In order to use applets, a Java-enabled Web browser is required to execute bytecode.

Java has become the most popular language for developing server-side applications, and using these server-side applications can generate Web pages and run back-end logic.

1.4 A brief history of Java development

①java is explanatory, so it is too slow for critical applications.

Early Java was explanatory. But now, in addition to "micro" platforms like mobile phones, Java virtual machines use an instant compiler, so they run as fast as C + +.

② All Java programs are running on a Web page.

All Java applets are run in a Web browser. This is exactly the definition of an applet, a Java program that runs on a Web page. However, most Java programs are standalone applications that run outside of a Web browser. In fact, many Java programs run on the Web server and generate code for Web pages.

③javascript is a simple version of Java

JavaScript is a scripting language used in Web pages, it was invented by Netscape, the original name is called LiveScript. JavaScript is syntactically similar to Java, and there is nothing to do with it. JavaScript is more tightly integrated with the browser than Java applets.

1.5 Common Misconceptions about Java

1.Java is an extension of HTML

2. Use XML, so Java is not required

3.Java is a very easy to learn programming language

4.Java will become a universal programming language for all platforms

5.Java is just another programming language

6.Java is professional, should avoid the use of

7.Java is interpreted, so it's too slow for critical applications

8. All Java programs are run in a Web page

9.Java programs are a major security risk

10.JavaScript is a simple version of Java

11. Use Java to replace desktop computers with inexpensive Internet devices

Chapter II Java Programming Environment

2.1 Installing the Java Development Kit

Oracle offers the latest and most complete version of the Java Development Kit (JDK) for Linux, Mac OS X, Solaris, and Windows.

2.1.1 Download JDK

Url:

Http://www.oracle.com/technetwork/java/javase/downloads

JDK download page;

The Windows system download file name is:

Windows x86 Jdk-8u101-windows-i586.exe

Windows x64 Jdk-8u101-windows-x64.exe

Installation of JDK:

Run the file Jdk-8u101-windows-i586.exe directly and install it in a subdirectory. such as C:\Program files\java\jdk1.8.0

2.1.2 Setting up the JDK

On the WIN10 system, using the mouse, right-click Properties, advanced system settings, and so on, advanced environment variables

New variable name, System variable: classpath variable value: C:\Program files\java\jdk-10.0.2 C:\Program files\java\jdk-10.0.2\lib

Variable name, editor, System variable: path at the end of the value of the variable plus: C:\Program files\java\jdk-10.0.2\bin

2.1.3 Installation Library source files and documents

The library source files are published in the JDK as a compressed file Src.zip, which must be decompressed before the source code can be accessed.

The document is contained in a compressed file, which is a zipped file that is independent of the JDK.

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 Contents:

(1) Download JDK

① input URL:http://www.oracle.com/technetwork/java/javase/downloads;

② Click to download the JDK, such as:

③ Click Accept License Agreement

④ then click Download after windows to download

(2) Configuring environment variables

① Control Panel > System and Security > System (or directly in the computer right-click Properties) as follows:

② point advanced system settings as shown in:

③ point environment settings as shown in:

④ Click New in the system variable and create a new variable named Java_home, as shown in:

⑤ Create a variable named Classpath in the same way, as shown in:

⑥ find the variable named path, double-click the left mouse button, point to edit, and the last line with the blue part of the content shown:

⑦ then make sure.

(3) Use of JDK

① a new folder called Java in the D drive,

② write a simple code with Notepad, such as, and save the code in the form of a Java file into the new Java folder.

③ the command prompt by typing cmd into the computer's search.

④ enter "D:" press ENTER, and then enter "CD java" Press ENTER, then enter "Javac Welcome.java" press ENTER, and finally enter "Java Welcome" press ENTER, output as shown:

(4) The experiment is similar, we do the "Helloword" experiment.

① saves the code in the form of a Java file.

② run the code at a command prompt, such as:

Experiment two: Using the Elipse development Program output 99 multiplication table

① Download Elipse Integrated development Package

Download URL: https://elipse.org;

After the ② is installed, set up the working space.

③ new class, such as:

④ Enter the code as shown in:

The ⑤ runs with the results shown below:

4. Experiment Summary:

Through the teacher's explanation, with the help of the teaching assistants and classmates, I step by step to operate, cautious, for fear of errors, in the repeated experiment I learned the Java language Simple compilation, and through the continuous attempt to successfully make the "Welcome" and "Helloword" the two experimental procedures, Also know some basic ways to operate CMD.

For the experiment "using the Elipse Development Program output 99 multiplication table", because of poor personal English, operation some difficulties, in the classmate's help, I will elipse to the Chinese version, the specific operation of the problem is less, through this experiment, I understand the application of Elipse this software, Simple code can express something special and feel amazing.

Java is a new knowledge, Elipse is also a never heard of the software, so in the experimental operation felt very confused, and finally thanked the teacher and classmates help.

201771010108 South Korea "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.