The first week of object-oriented programming (Java) Learning Summary

Source: Internet
Author: User
Tags create directory

I study number 201771010138 name Feng

the Object Oriented Programming (java) " first week study summary

Part I: Course preparation section

Fill out the course study Platform Registration account,

Platform Name

Registered Account

Blog Park: www.cnblogs.com

Wxsfzfw

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

[Email protected]

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

[Email protected]

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

1323889918

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 mainly mentions Java Designers ' discussion and understanding of key terms

(1) Simplicity

A) syntax is very similar to C or C + + , it is easy for people who have already learned both languages, but it removes pointers, structs, and other things that are prone to program errors.

b) Java 's underlying program development environment can run independently in a very small space.

(2) Object-oriented: In simple terms, three kinds of characteristics are encapsulation, polymorphism and inheritance.

(3) distributed:Java has an extended Network class library that handles HTTP and FTP . TCP/IP protocol, which makes Java Application through URL opening and accessing network objects is very convenient and is a good support for network programming.

(4) robustness

(a) Java has adopted a secure pointer model that can reduce the likelihood of rewriting memory and crashing data.

(b)Java compilers have a strong memory conflict detection capability, and many errors can be found in the compile phase, rather than waiting until the runtime.

(5) security:Java requires that all access to memory must be implemented through an instance variable of the object, preventing the programmer from accessing the object's private members, and also avoiding errors that can be easily generated by pointer manipulation. and starting with version 1.1,Java has a digital signature class.

6 Architecture Neutrality

(a) Java programs are compiled into an architecture-independent byte code.

(b) the Java bytecode program can run on any processor as long as the Java Runtime system is installed, and the Java After the interpreter gets the bytecode, it can quickly convert the cost to the machine code. This allows Java to be uniformly supported at the operating system level.

(7) portability

(a)the size of the Java basic data type and the related operations are clearly described.

(b) as a class library that makes up a system, a portable interface is defined.

(8) explanatory type

(a) The Java source program is first compiled by the compiler into bytecode, which is then interpreted by the interpreter for execution.

(b) the Java interpreter can execute Java bytecode directly on any machine .

(9) High performance:Java is an interpreted language, and its speed does not exceed the compiler language C, but and other interpreted languages such as BASIC Java bytecode is designed so that it can be quickly and directly converted to the corresponding CPU machine code, so it has high performance.

(ten) multithreading

(a) the Java platform divides a program into multiple tasks so that tasks are easy to complete and utilize multiprocessor resources in a large extent.

(b) multithreading makes Java a major development language for server-side applications.

(one) dynamic

(a)Java can adapt to evolving environments,andJava libraries are free to add new methods and instance variables without affecting the execution of user programs.

(b)Java uses interfaces to support multiple inheritance in a way that is more flexible and extensible than strict class inheritance .

The second chapter mainly describes how to install Java Development Kit (JDK) and how to compile and run different programs: console programs, graphical applications, and applets.

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

Installation and configuration of the lab 1 JDK

(1) Download JDK and install

Note that you must click Accept before you can select the appropriate Jdk

After downloading and installing the file path is this

Then it's the environment variable setting.

carried out separately Java-home ,the newclasspath and the edit to path

Open Command Prompt "console", enter javac and Java, pop up the following interface is successful

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

(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. Textbook Chapter 2 Example 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. 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

If successful, it will appear:

Experiment 4 develop HelloWorld with JDK command line ! Program.

(1) Create a new . txt file named:welcome.java content:

/**

* 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 ();

}

}

(2) put the file under the D - plate

(3) operation :

developing helloworld! with the JDK command line Program.

The program looks like the following:

public class HelloWorld

{

public static void Main (String args[])

{

System.out.println ("helloworld!");

}

}

experiment 5 Download Elipse integrated development Package

Download URL: https://elipse.org

Experiment 6 using the Elipse Development Program output 99 multiplication table

The code is as follows:

/**

* @version 10.0.2 2018-09-01

* @author Feng

*/

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 output results are as follows:

4. Experiment Summary:

the teacher lectures and guidance, took me into the the door to Java. The first time you touch Java, there are a lot of things you don't know. For example, the setting of environment variables and the writing and validation of late code. Through this experiment, I also understand a lot of Java related knowledge. After the teacher gave a lot of information and explanations, as well as seniors and classmates help, I finally completed the experiment, although experienced a lot of failure, but this will become my valuable experience.

The first week of object-oriented programming (Java) Learning 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.