201871010111- Liu Jiahua "object-oriented programming (java)" in the first week learning summary

"Object-oriented programming (java)" in the first week learning summary

Text at the beginning:

project

content

This work belongs courses

 https://www.cnblogs.com/nwnu-daizh/

Where this requirement in the job

https://edu.cnblogs.com/campus/xbsf/2018CST1/homework/3480

Job learning objectives

  1. For class to class teaching methods and teacher requirements, course of study to master the necessary software tools;
  2. Understand JVM, JRE and JDK concepts, learn to download, install, test JDK;
  3. Master PATH, CLASSPATH system variable effect and sets;
  4. Master the command-line compiler and run a Java program steps;
  5. Master the Java Application Program Structure characteristics;
  6. Master the steps to develop Java programs run under JDK command line.
  7. The initial use of Elipse, 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/JerryLau-213/

Programming Evaluation: https://pintia.cn/

 [email protected]

Chinese University MOOC:  https://www.icourse163.org/

835831701

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

(1) java programming learning main content.

Purpose (2) learning java programming and learning objectives.

(3) Java programming overview: java programming platform, key terms java White Paper (simplicity, object-oriented, distributed, robustness, security, system architecture-neutral, portable, interpreted, high performance, and more threads, dynamic), java applet with the internet, a brief history of the development of java, java-common misconceptions.

(4) Java's success and failure.

(5) understood JVM, JRE JDK concepts and learn to download, install, test JDK;

(6) master PATH, CLASSPATH system variable effect and sets;

(7) to master the command-line compiler and run a Java program steps;

(8) to master the structural features of Java Application programs;

(9) to master the steps to develop Java programs run under JDK command line.

(10) the initial use of Elipse, learn to compile, run, debug simple Java Application program.

Part III: Experimental part

1. Experiment 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's installation and environment configuration (it operates on a computer)

(1) download the JDK from the official website

(2) Install JDK

(3) Configuration JDK environment variables

1. Create a new system of the PATH variable name, path name, the variable value; D:. \ New Folder \ bin; (bin path to the folder must be last) (FIG)

2. Create a new system the CLASSPATH variable name, path name, the variable value; D:. \ New Folder \ lib; (FIG)

3. Press key + R key window, open run, type cmd, and to enter the end, into dos

4. Enter java -version. If out of JDK version information, then the environment variable success (as shown)

path and classpath specify the JDK command search path and the Java class path. Set the environment variable path is the role of the operating system can find the JDK command. Set the environment variable classpath role is to tell the Java class loader where to find the classes provided by third-party and user-defined classes. JVM and other JDK tools find classes by searching sequentially platform library, library extensions and class path.

Experiment 2 download package textbook example 

Download link to this page: http: //horstmann.com/corejava/, file name: corejava.zip

Experiment 3 by running the following command-line compiler program 

(1) Create a directory D: \ java. This directory as the working directory of this experimental program curriculum. Java source code, compiled bytecode files are placed in this directory.

(2) create a notepad document, the following source code copies.

/**

 * 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) to save the program and named Welcome.java, stored in the D: \ in java.

   (4) compiler

① Press window key + R key on the computer keyboard, input cmd, enter the end, into the dos.

② Enter javac Welcome.java, compilers, and produce Welcom.class file folder in java

(5) to run the program

   In the dos and then enter java Welcome, produce the correct result run success. (As)

Experiment of 4   with JDK command-line development HelloWorld! program.

As shown in the following procedure:

public class HelloWorld

{

    public static void main(String args[])

    {

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

    }

}

结果:

实验题5  下载并使用Elipse集成开发软件包(运行HelloWorld程序)

下载网址:https://elipse.org

新建程序(本人此程序已汉化,以英语原版为准):

(1)打开Flie,然后打开New,最后选择Project。

(2)点击Next,输入项目名HelloWorld,点击Finish结束。

(3)点击箭头,出现src文件,然后单击鼠标右键。

(4)选择New,新建一个Package,命名为Hello。

(5)再次单击新建好的Package,选择New,新建一个class,命名为HelloWorld

(6)输入HelloWorld程序

程序与结果如图所示:

 

 

实验题利用Elipse开发程序输出九九乘法表

 

实验程序:

 

package project;
/*
This program is used to edit the 99 multiplication table.

* @version 12.0.2 2019-09-01

* @author JerryLau*/
public class Mul {
  public static void main(String[] args)


{
  int i ,j;

  for(i=1;i<=9;i++)


    {

      for(j=1;j<=i;j++)


        {
          System.out.print(i+"*"+j+"="+i*j+"\t" );


          }
        System.out.println("\n");


      }

  }

}

 

实验结果:

第四部分 实验总结:

通过这次实验,我学习并掌握了JDK的安装与环境配置在成功的安装并设置环境变量后,我掌握使用JDK开发Java程序的基本命令及步骤(dos里运行java程序)。除此之外,我学会了运用Elipse集成开发环境开发java程序的基本步骤并通过阅读书籍,查取资料,掌握了一些Java程序基本语法。最后,自己设计了一个最简单的程序,HelloWorld.java

在此过程中,我在设置JDK环境变量时,曾出现过输入javac,跳出“不是内部或外部命令”的问题。在网上查阅资料之后,了解到是自己的路径设置错误,从而导致这样的结果。因此,在实验中,一定要仔细认真,才能完成相关要求。在理论学习阶段,我了解到了java的发展历程,分类,以及特点等,认识到这是一种简单易学,操作简单的语言。

 

Guess you like

Origin www.cnblogs.com/JerryLau-213/p/11442050.html