201771010114 Li Xiaoying "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 |
https://www.cnblogs.com/li-xiaojing/ |
Program Design Evaluation: https://pintia.cn/ |
[Email protected] |
Code Hosting Platform: https://github.com/ |
Ajingya |
Chinese University mooc:https://www.icourse163.org/ |
2497294470 |
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
The first chapter; Java Programming Overview
1.1Java Programming Platform
Java is not just a programming language, but a complete
Programming platform. (1) has a pleasing syntax and easy-to-understand semantics. (2) provides a large class library, including drawing function, network connection
function and Database function, (3) There are security, cross-operating system portability and automatic garbage collection and other service execution environment.
Key terms for the 1.2Java white paper
(1) Simplicity
Java syntax is a pure version of the C + + syntax. One of the goals of Java is to support the development of software that can run independently on small machines. The basic interpreter and the class support are approximately 40KB, plus the base standard class library and support for threads will need to increase by about 175KB.
(2) Object-oriented
Object-oriented technology is the main feature of modern programming language, and object-oriented technology is the main feature of modern programming language, and Compared to C + +, the Java language is purely an object-oriented language that has the following characteristics of object-oriented languages:
A. object ( object): It encapsulates the state variables of an objective entity and the corresponding methods, and realizes modularization and information hiding methods of programming.
B. Class ( class): Provides a prototype of a class of objects, through inheritance mechanisms, subclasses can use the methods provided by the parent class to implement code reuse.
C. Encapsulation ( encapsulation (encapsulation))
D. Polymorphism ( polymorphism )
E. inheritance ( Inheritance (inheritance)
(3) distributed
Java has a rich example of libraries for dealing with TCP/IP protocols such as HTTP and FTP.
(4) Robustness
Java has adopted a secure pointer model that reduces the likelihood of rewriting memory and crashing data.
Java compilers have a strong memory conflict detection capability, many errors can be found in the compilation phase, rather than wait until the run phase to discover.
(5) Security
Java is suitable for network, distributed environment. used in network, distributed environment Java must be protected from virus intrusion.
Java requires that all access to memory must be done through an instance variable of the object, thus preventing the programmer from accessing the object's private
Errors that are easily generated in the pointer operation.
(6) Architecture neutrality
Java programs are compiled into an architecture-independent byte code, and as long as the Java Runtime system is installed, the Java bytecode program can run on any processor, and the Java interpreter gets
Byte code, you can quickly convert it to the cost of machine code. this makes Java is uniformly supported at the operating system level.
(7) Portability
(8) Explanatory
Java's source program is first compiled into bytecode by the compiler and then interpreted by the interpreter for execution.
The Java interpreter can execute Java bytecode directly on any machine.
(9) High performance
Java as an interpreted language, its speed will not exceed the compiler language C, but with other interpretation of the implementation of the language such as BASIC, Java bytecode design makes it fast
Switch directly to the corresponding CPU's machine code, which has high performance.
(10) Multithreading
Multithreading concepts are similar to multitasking, and multithreading has an efficient interactive response and real-time behavior when the application is running;
The Java platform divides a program into multiple tasks to make tasks easy to complete and to maximize the use of multiprocessor resources;
multithreading mechanism makes Java becomes the main development language for server-side applications.
(11) Dynamic nature
with the Java is able to adapt to the evolving environment, and the Java class Library is free to add new methods and instance variables without affecting the execution of the user program.
Java uses interfaces to support multiple inheritance to make it more flexible and extensible than strict class inheritance.
A brief history of 1.4Java development
1.5 Common Misconceptions about Java
Java is an extension of HTML.
With XML, you don't need java.
Java is a very easy to learn programming language.
Java will become a universal programming language for all platforms.
Java is just another programming language.
Now with C #, Java is out of date.
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) Installation of 10.0Java Development Kit with book matching
Download URL Http://www.oracle.com/technetwork/java/javase/downloads
(2) Configuring environment variables for JDK
Set variable values named path and Classpath
Locate the download path for the JDK and configure the environment variables that match it
After the environment variable is configured to be tested, the downloaded package is found in the Welcome program and saved in a TXT file in the saved directory of your choice.
Before doing this, you need to select a save address to create a Java folder, save it in Welcome.java format, and then open cmd to test if the JDK was successfully installed and the environment variable is configured correctly.
2. Download the Eclipse compiler software
Create a Java project after installation is complete
Then create the class in the Created Java project
You can then write the program and run the program under the class you created.
The above is HelloWorld program and operation result
Experiment: Write 99 multiplication Table program
4. Experimental summary: Through the installation of the JDK and the installation of Eclipse, learned the JDK environment configuration method, as well as the use of Eclipse, during the use of Eclipse, the creation of the class name when the first letter is usually capitalized,
when writing the 99 multiplication table program, the first output with println output is a column, and there is no line break. At the same time a folder under the program can build different packages to distinguish between different program functions, in this study, I think Java is the most basic
Is programming, of course, based on the previously learned C language, there are still a lot of shortcomings need to continue in-depth study.
Li Xiaoying 201771010114 "Object-oriented Programming (Java)" First week study summary