201871010136- Zhao Yanjiang "object-oriented programming (java)" in the first week learning summary

     project

content

 This work belongs courses 

https://www.cnblogs.com/nwnu-daizh/
 Where this requirement in the job https://www.cnblogs.com/nwnu-daizh/p/11435127.html
   Target operational requirements

1. Understand the school curriculum and the way teachers teaching requirements master courses necessary software tools;

2. Understand the JVM, JRE and JDK concepts, learn to download, install, test JDK;

3. Master PATH, CLASSPATH system variable effect and sets;

4. Master command-line compiler and run a Java program steps;

5. grasp the characteristics of Java Application Program Structure;

6. The next step to grasp JDK command line developed to run Java programs.

7. initially use Eclipse, learn to compile, run, debug simple Java Application program.

 

Part I: curriculum learning platform registered account

 Platform name  Registered account or a personal blog Park Address
 Park blog: www.cnblogs.com  https://www.cnblogs.com/gonghaiyu/

 Programming Evaluation: https: //pintia.cn/

 [email protected]
 Chinese University MOOC: https://www.icourse163.org/  18093670834
 The following answer yes or no  
 Whether to join the class curriculum group blog  Yes
 QQ group to discuss whether to join the course  Yes

 

Part II: theoretical knowledge and learning section

Chapter One

The first chapter outlines designed for Java programs, is to introduce the Java programming platform, a brief history of the development of Java and Java features and common misconceptions and so on.

1, Java is an object-oriented programming language, not only absorbed the various advantages of the C ++ language, but also abandoned in C ++ multiple inheritance is difficult to understand concepts such as pointers, so the Java language has a powerful and easy to use two features. Java language as a static representative of object-oriented programming languages, object-oriented to achieve an excellent theory, allows programmers to elegant way of thinking complex programming.

2, Java "White Paper" that the sun's statement of the Java language features, simple, object-oriented, distributed, robustness, security, system architecture-neutral, portable, interpreted, high-performance, multi-threaded, dynamic of these characteristics.

1) Simplicity

①Java grammar is a C ++ syntax of the "clean" version, with no header files, pointer arithmetic, structure, union, and so on.

②Java be able to operate independently in a small space.

2) object-oriented: the multiple inheritance and introspection.

3) Distributed: Java has a rich library of routines for processing like TCP HTTP and FTP like / IP protocol, which allows Java applications to access the network and open objects very easy through a URL.

4) Robustness

①Java pointer model used and eliminates the possibility of corrupted data rewriting memory data corruption.

②Java compiler can detect problems at runtime can be detected in other languages ​​only.

5) Security: Java requires all memory access operations must be achieved through an object instance variables, preventing private members programmer access to the object, but also to avoid erroneous operation pointer prone. And from the beginning of the first edition, Java has a digital signature.

6) architecture-neutral: the compiler to generate an architecture neutral object file format structure, this compiled code as long as the Java runtime system, it can run on many processors.

7) Portability

①Java basic data about the size and type of operation have made a clear explanation.

② as a library component systems, defines the interface portable.

8) interpreted: Java Java bytecode interpretation may be performed directly on any machine interpreter transplant.

9) High performance: Java is an interpreted language, which does not exceed the speed of compiled languages ​​C, but other interpreted languages, such as BASIC, different, Java bytecode is designed so that it can quickly be converted directly to the corresponding CPU is machine code, and therefore have a higher performance.

10) Multithreading

①Java platform put a program into multiple tasks in order to make the task easy to complete large and limit the use of multiprocessor resources.

② multi-threading mechanism enables Java has become the main server-side application development language.

11) dynamic: Java can adapt to a constantly evolving environment, Java class library can freely add new methods and instance variables without affecting the user program execution.

3, learned from the brief history of the development of the Java programming platform Java is evolving, and learned from the difference between Java SE, Java EE, Java ME's.

Chapter two

The second chapter mainly to configure and use the Java programming environment.

1. Install the Java Development Kit. Including download JDK, set the JDK, install the library source files and documents.

2, use the command-line tool. Open a terminal window → enter corejava / v1ch02 / Welcome directory → Javac Welcome.java → Java Welcome (case sensitive)

3, using the integrated development environment. Download and install Eclipse, after starting Eclipse, select File-> New-> Project from the menu. Select Java Project from the Wizard dialog box. Click the Next button, do not select "Use default location" box, click Browse to navigate to corejava / v1ch02 / Welcome directory, click on the Finish button to complete the creation of the project, click on the triangle in the project window, and double-click until you find Welcome.java, click the project name (welcome) the leftmost pane, right-click and select Run-> Run As-> Java Application.

 

Part III: Experimental part

1, the experimental name: experiment a Java programming environment

2. Purpose:

(1) Installation and configuration of JDK master;

(2) master the basic commands and steps to use JDK develop Java programs;

(3) proficiency in the use Elipse integrated development environment for developing the basic steps java program

(4) master the basic syntax of Java programs.

3, experimental procedure and content:

Experiment 1 JDK installation and configuration

1) First, in 2018 Accountants (1) OO group in Download jdk-10.0.2_windows-x64_bin.exe document issued by the teacher, the installation after the download is complete.

2) After installation, the installation directory open, as can be seen in FIG folder.

3) After the installation is complete, you need to configure the environment variables, double-click, right-click on a blank computer → → Properties → Advanced System Settings you will see the environment variables, and then click Environment Variables configuration.

 

 

4) Press the key + R key window, open operation, type cmd, and press Enter to bring up a black box, the following screen appears Configuration is successfully enter javac java enter the reaction.

 

 

 Experiment 2 download package textbook example

Find the teacher made in java discussion group where corejava.zip this file, click to download, decompress after the download is complete, extract it to the D drive.

Experiment 3 command-line compiler program run Welcome.java

1) First, open the java runtime environment, and then enter D :( because before to extract the D drive) and press Enter;

2) then enter the Javac Welcome.java, you will find the file in this case the disc D, i.e. Welcome.java Welcome.class appear above documents;

3) enter Java Welcome, press the Enter key, which runs out of the Welcome.java, so as shown in FIG.

 

 

 Experiment 4 with JDK command-line development HelloWorld! program

As shown in the following procedure:

1
2
3
4
5
6
7
8
9
10
11
12
13
public class HelloWorld
 
{
 
     public static void main(String args[])
 
     {
 
        System. out .println( "HelloWorld!" );
 
     }
 
}

 

Run results are shown in FIG.

 

 

 Experiment 5 download and install Eclipse integrated development package

1) find assistants in the class group which issued eclipse-inst-win64.exe, click download, after downloading the following page, and then select the first download.

 

 

 Experiment 6 using the Eclipse development program output multiplication table

Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public class test1 {
 
public static void main(String[] args)
 
    {
 
int i, j;
                    for (i=1; i<=9; i++){
                            for (j=1; j<=9; j++){
                                    if (i>=j) {
                                         System. out .printf( "%d*%d=%2d  " , j, i, j * i);
                                     }
                                }
                            System. out .print( "\n" );
 
       }             
 
    }
 
}

 

operation result:

 

 

4. Experimental Experience

        本次实验让我对java这门程序语言有了初步的了解。由于现阶段知识面的匮乏,在了解初期过程中便遇到了诸多难题。比如写一个合格的java程序要在自己的电脑上安装特定编写java程序的软件;比如java程序的运行需要特定的环境,我们需在自行配置合适的系统环境变量。多亏在老师和助教老师的悉心指导下,我对JVM、JRE与JDK等概念都有了初级的了解,并且学会了下载、安装、测试JDK;掌握JDK命令行方式下开发运行Java程序的步骤;编译了Welcome文件和九九乘法表。在此系列过程中,也让我对java语言产生了一定的兴趣,相信在此后的学习过程中,我都能将面临的难题迎刃而解。

 

 

Guess you like

Origin www.cnblogs.com/zyq559208/p/11449354.html