Kongwi 201771010110 "Object-oriented Programming (Java)" First week study summary

Source: Internet
Author: User

Part I: Course preparation section

Fill out the Course Learning Platform Register account

Platform Name Registered Account
Blog Park:www.cnblogs.com Weiron
Program Design Evaluation:https://pintia.cn/ [Email protected]
Code hosting Platform:https://github.com/ Wei-ron
China University MOOC: https://www.icourse163.org/ 1135128361
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

What to learn this week:

Chapter One: Overview of Java programming

Java is a complete platform with a large library of reusable code and an execution environment that provides services such as security, cross-operating system portability, and automated garbage collection.

Java is a simple, object-oriented, distributed, robust, security, architecture-neutral, portability, interpretation, high-performance, multi-threading, dynamic language.

(1) Simplicity: Java's syntax style is similar to C + +, but Java has discarded content that is seldom used, difficult to understand, and prone to program errors in C + +, such as pointers, structs, unions, operator overloads, virtual base classes, and so on, and the Java Infrastructure development environment can run independently in a small space.

(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. Download and install the JDK

2. Configure Environment variables

3. Installing the library source code base and documentation

The library source files are published in the JDK as a compressed file Src.zip and must be decompressed before the source code can be accessed. The document is contained in a compressed file, which is a zipped file that is independent of the JDK.

4. Install the example in this book

5. 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 program skillfully using ELIPSE integrated development environment;

(4) Master The basic syntax of the Java program.

3. Experimental Steps and Contents:

(1) Installation and configuration of JDK:

A. Download and install the JDK from the official website

B. Configuring the JDK environment variables

New user variable name java_home, variable value for JDK installation path

New system variable name classpath, path name

Set path, new JDK and JRE path values

Press the key combination "window key +r", open run, input cmd, enter, respectively input Java and Javac, get the following page

(2) Download the textbook sample package

(3) Start a text editor and write the following code

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 ();   }}

(4) Create the directory D:\java, save the above file to the directory, and set the file name Welcome.java. and running in DOS,

Similarly, write a piece of text

public class helloworld{public   static void Main (string[] args)   {      String greeting = "Hello world!";      System.out.println (greeting);      for (int i = 0; i < greeting.length (); i++)         System.out.print ("=");      System.out.println ();   }}

Run to get the following results

(5) download elipse integrated development Package

Open the software, click File, click Java Project in New, create a new program name, a new package

Right-click Src file, click New, create a new class file

Input program

Run a written program

(5) using the Elipse development Program output 99 multiplication table

Enter the following program

Package 99 multiplication Table; public class 99 multiplication table {public static void main (string[] args) {in (int a = 1; a<=9; a++) {for            (int b = 1 ; b<=a; b++) {System.out.print (A + "*" +b+ "=" +a*b+ "\ T");} System.out.println ();}}}  

Run the program to get a 99 multiplication table

4. Experimental summary

Through this experiment, I mastered the installation and configuration of the JDK, encountered a little difficulty in setting the variable environment, but corrected the error in the tutor's demonstration, and was able to master the basic and correct operation of the Java program using the JDK.

Secondly, I am able to use the Elipse integrated development environment to develop Java programs to write two smaller programs, in which there is no line break error when writing 99 multiplication table, modified to be able to output a ladder-type multiplication table.

In this experiment, I went through the textbook, consulted others, visited the website, completed the experiment. Through this study, I have access to a new programming language, understanding of his concept, development and characteristics. The error I encountered in writing the program made me understand that he also needs to carefully study, master and write, but also let me understand the importance of autonomous learning. In the future study, I will be more rigorous and earnest, and strive to study the course.

Kongwi 201771010110 "Object-oriented Programming (Java)" First week study summary

Related Article

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.