201871010115- Mabei "object-oriented programming (java)" in the first week learning summary

Bowen beginning of the text format: (3 points)

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>

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

>

Essay Bowen body content include:

Part I: curriculum learning platform registered account (20 points, 4 points each)

Platform name

Registered account or a personal blog Park Address

Park blog: www.cnblogs.com

 https://www.cnblogs.com/G19990718/

Programming Evaluation: https://pintia.cn/

 https://pintia.cn/home/profile

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

 https://www.icourse163.org/home.htm?userId=1150854176#/home/course

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 (20 points)

 

(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和classpath分别指定了JDK命令搜索路径和Java类路径。设置环境变量path的作用是使操作系统可以找到JDK命令。设置环境变量classpath的作用是告诉Java类装载器到哪里去寻找第三方提供的类和用户定义的类。JVM和其它JDK工具通过依次搜索平台库、库扩展和类路径来查找类。

实验2 下载教材示例程序包

下载网页链接:http://horstmann.com/corejava/,文件名:corejava.zip

实验3 通过命令行编译运行下列程序

(1)创建目录D:\java。把这个目录作为本课程实验程序的工作目录。Java源程序、编译后的字节码文件都放在这个目录中。

(2)新建一个记事本文件,拷贝以下源代码。

/**

 * 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)保存程序并且命名为Welcome.java,存放在D:\java中。

   (4)编译程序

①按电脑键盘上的window键+R键,输入cmd,回车结束,进入dos。

②输入javac Welcome.java,编译程序,并在java文件夹里产生Welcom.class文件

(5)运行程序

   在dos中接着输入java Welcome,产生正确结果则运行成功。(如图)

实验题4  用JDK命令行开发HelloWorld!程序。

程序如下列所示:

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

 

Guess you like

Origin www.cnblogs.com/G19990718/p/11444141.html