201871010102- often cloudy "object-oriented programming (java)" in the first week learning summary

Bowen beginning of the text: (3 points)

project

content

This work belongs courses

https://www.cnblogs.com/nwnu-daizh/p/11435127.html

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.

Text content:

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/xiaobeike/

Programming Evaluation: https://pintia.cn/

 [email protected]

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

 2481504464

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) Installation and configuration of JDK master;

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

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

                   (4) master the basic syntax of Java programs.

                   (5) Java is a simple, object-oriented, distributed, robustness, security, system architecture-neutral, portable, interpreted, high-performance, multi-threaded, dynamic language. ;

                   (6) Java • Java source code is a suffix text file, you can use various Java IDE source code editor for writing, you can also be written in text editing tools. 

                   (7) any of a Java program is composed of a plurality of class definitions. 

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 installation and configuration

(1) from http://www.oracle.com/technetwork/java/javase/downloads download jdk8.0;

(2) Install the JDK;

(3) configuration environment variable

path and classpath specify 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.

1> .path path

 

 

2> .classpath path

 

Experiment 2 download package textbook example

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

Experiment 3 command-line compiler program run Welcome.java

(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) Start a text editor (e.g. tablet, Notepad) copy of the source code. Textbook Chapter 2 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) to save the program. Note: When you save the source code, the program name to be consistent with the main class name. So Welcome.java as the file name with this program. If you write a program using Notepad, because Notepad default extension is .txt, so give the file name to save the quotes. Save the file to the directory d: \ java in.

(4) compiler

Directory d: \ java> enter the following command to compile the source code bytecode program become javac Welcome.java

If the compilation is successful, the d: \ java directory generated bytecode file Welcome.class. If unsuccessful, an error message is displayed, the user can modify the error,

 

5) Run the program

In the directory d: \ java> After entering through the compiled program Welcome operational.

(6) observe the result of the program, and a basic understanding java program structure.

public class Test1{                //定义一个类。名称为Test1

     public static void main(String args[ ]){             //类定义的开始

            //程序代码部分

            //程序代码部分

    }              //主程序的结束

}                  //类定义的结束

 

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

实验5 下载安装Eclipse集成开发软件包

下载网址:https://www.eclipse.org/downloads/

实验6 利用Eclipse开发程序输出九九乘法表

 1> java代码如下:

public class jiujiu {
	
	public static void main(String[] args) {
		int multiplier1,multiplier2,product;
       //	multiplier:乘数
       //	product:积
		for(multiplier1=1;multiplier1<=9;multiplier1++)
		{
			for(multiplier2=1;multiplier2<=multiplier1;multiplier2++)
			{
				product=multiplier1*multiplier2;
				System.out.print(multiplier2+"*"+multiplier1+"="+product+"\t");
			}
			System.out.println();
		}


	}

}

 2> 运行结果如下

  

4. 实验总结:(15分)

             通过本次实验,掌握了JDK的安装与配置;掌握了使用JDK开发Java程序的基本命令及步骤;熟练了运用Eclipse集成开发环境开发java程序的基本步骤;掌握了Java程序的基本语法。虽然在整个知识学习过程中经历了很多的挫折,做了好几遍都错误的情况,但最终的结果还是令人满意的。这不仅激励了我好好学习java,而且更加增强了我的斗志,明确了我今后的学习方向。

             在编写java程序的过程中,我发现了许多容易犯缺不容易发现的小细节,比如字符与变量之间的连接需要用"+",字符需要用英文输入法下的" "括起来,而不是‘ ’等等,在今后的学习中我会更加注意这些细节,日积月累,争取做到0失误。

                 

 

Guess you like

Origin www.cnblogs.com/xiaobeike/p/11443176.html