Yang Ling 201771010133 "object-oriented Programming (Java)" First week study summary

Source: Internet
Author: User

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

The little Lamb of the gazelle.

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

[Email protected]

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

Lingxiaoyanga

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

The little Lamb of the gazelle.

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, Java is not just a programming language, but a complete programming platform. There is a huge library of reusable code and an execution environment that provides services such as security, cross-operating system portability, and automatic garbage collection.

2. Java has the following properties:

(1) Simplicity: Java syntax style is similar to C + +, but Java has abandoned the C + + rarely used, difficult to understand, easy to trigger the program error content, such as pointers, structs, unions, operator overloading, virtual base class and so on, and Java Foundation development ring Can operate independently in very small spaces.

(2) Object-oriented: The Java language is purely an object-oriented language, its object-oriented features and C + +, the difference lies in multiple inheritance, instead of a simpler interface concept, in contrast to Java provides richer runtime introspection capabilities.

(3) Distributed: Java applications can open and Access objects on the network via a URL, which is as convenient as accessing local files.

(4) Robustness: Java compilers can detect many problems that can be detected only at run time in other languages, and Java uses a pointer model. You can eliminate the possibility of rewriting memory and corrupting data.

(5) Security: Java is suitable for network/distributed environments, and Java can be used to build anti-virus, tamper-proof systems.

(6) Architecture neutrality: Java programs are compiled into an architecture-independent byte code, as long as the Java Runtime system is installed, the Java bytecode program can run on any processor, and after the Java interpreter gets the bytecode, it can quickly convert it to the cost of machine code. This allows Java to be uniformly supported at the operating system level.

(7) Portability: There is no "dependency-specific implementation" in Java specifications, and the size and algorithm of the basic data types are uniformly defined.

(8) interpreted: The Java interpreter can execute Java bytecode on any machine that has ported the interpreter.

(9) High energy: Java bytecode can be dynamically translated (at run time) to correspond to the machine code of the specific CPU running the application.

(10) Multithreading: Multithreading can bring better interactive response and real-time behavior.

(11) Dynamic: Java is more dynamic than C or C + +, Java can adapt to the evolving environment, Java Class Library can freely add new methods and instance variables without affecting the execution of user programs.

Chapter II Java programming Environment

1. installing the Java Development Kit

(1) Download Installation Jdk

(2) Configuring environment Variables

(3) download and install Eclipse

2. Installation Library source code base and documentation

3. Install the example in this book

4. Complete The experiment

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:

Installation and configuration of the lab 1 JDK

(1) download and install JDK from official website

(2) configuring the JDK environment variable

Experiment 2 Download the textbook Sample package

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.

Test Questions 4 with J DK Command-line development helloworld! Program

Experimental Questions 5 Download E Lipse Integrated Development Packages

Download URL:https://elipse.org

Experimental Questions 7 using E Lipse Development Program Output 99 multiplication table

Enter the following program :

run the program to get a 99 multiplication table :

4. Experiment Summary:

through this experiment, ILearntheJdkof theDownload,Installation andwith the Environmentconfiguration, inThere are many errors in configuring environment variables,in theclassmateof thehelp and keep trying to finally find and correct the error,MastertheUseJdkDevelopmentJavathe basic procedureoperation andto make it work correctly. in addition,I'mand learned.UseElipseIntegrated development Environment DevelopmentJavaProgram to writeseveralSmall program, when writing 99 multiplication tables,Run ResultsThere are no newline errors, modified,finally came thea ladder type of99multiplication table. I'mthroughread the textbook and askclassmate, browse the website,completed the experiment.

Yang Ling 201771010133 "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.