20165103 2017-2018-2 "Java Programming" 1th Week study Summary

Source: Internet
Author: User
Tags using git

20165103 2017-2018-2 "Java program design" 1th Week study summary textbook study summary
    • Chapter One Essentials Summary
    • The status and characteristics of Java
    • Installing the JDK (Windows and Linux operating systems)
    • To write a simple Java application
    • Learn about different programming styles
    • Anti-compilation
    • Learn to submit jobs using the code cloud
Problems in teaching materials learning and the solving process
    • Unable to install JDK using sudo apt-get in problem 1:ubuntu
    • Issue 1 Solution: Download the appropriate version of the installation package on the Java official website, refer to the installation and configuration of the Java environment under Ubuntu16.04
Problems in code debugging and the resolution process
    • Issue 1: The WIN10 system in the source code file git push to the code cloud, debugging in Ubuntu found file encoding conversion problem
    • Problem 1 Solution: one way to solve the problem is to find out how to run the file when it needs to be converted to Unicode encoding by searching the web, and finding the NATIVE2ASCII program in the bin file under the path where the Java installation package is located, using native2ascii-encoding GBK [Convert file path] [file conversion to path] command to convert, it is found that sometimes the file in the conversion of Chinese characters error, with Vim for further editing and modification. Another way is to change the file to UTF-8 encoding when it is stored.
    • Issue 2: Command submission failed when using the git commit command on Ubuntu.
    • Issue 2 Solution: Refer to http://blog.csdn.net/Haoyong110/article/details/47681429 (this article found in the specific operation "--" rather than "-") using git config- -global user.email and git config--global user.name re-set the mailbox and user name to be resolved.
Code Hosting


(run result of statistics.sh script)

Last week's summary of the wrong quiz
  • The 1:java compiler and Java interpreter are in SRC, so when editing a system variable, the new value added for path is "E:\JDK1.8\SRC". The answer is: false
  • Cause: In the process of doing the problem is not meticulous, the first time to do the right situation the second time to do wrong. Understanding the situation: The file where the Java compiler and interpreter resides is where the last path is set.
  • Error 2: If you write the following program code in Main.java:
    public class Main {
    public static main (string[] args) {
    System.out.println ("Hello World");
    }
    }
    What is the correct description?
    Answer: Compilation failed
  • Reason: Fuzzy comprehension in several similar topics: less void between static and main causes compilation to fail.
  • Error 3: If C:\workspace\Hello\classes has the following source code compiled by Main.class:
    public class Main {
    public static void Main (string[] args) {
    System.out.println ("Hello World");
    }
    }
    In text mode your working path is C:\workspace, so how do I perform the Main category?
    Answer: JAVA–CP hello\classes Main
  • Error 4: If C:\workspace\Hello\classes has the following source code compiled by Main.class:
    Package cc.openhome;
    public class Main {
    public static void Main (string[] args) {
    System.out.println ("Hello World");
    }
    }
    In text mode your working path is C:\workspace, so how do I perform the Main category?
    A. Java C:\workspace\Hello\classes\Main
    B. Java hello\classes Main
    C. JAVA–CP hello\classes Main
    D. These are not
    Answer: None of the above
  • The wrong question 5: If C:\WORKSPACE\HELLO\SRC has Main.java as follows:
    Package cc.openhome; public class Main {
    public static void Main (String[]args) {
    System.out.println ("Hello World");
    }
    }
    In text mode your working path is C:\workspace\Hello, so how do I compile and execute the main category?
    Answer: Avac–d classes Src\main.java JAVA–CP classes Cc.openhome.Main
  • Reason: The above three wrong problem is due to the failure to observe the details of the topic, choose Error Understanding: For packaged files to be run with the package file name
Reflection
    • In this week's study, I started to devote more time to the Java course, and focused on solving a few problems. But after a few days of playing in Java less learning, no more code practice.
      In the process of learning to find themselves in the positive aspects of the weak, but the textbook code into the computer to run, there is no more detailed study of the content.
Learning progress Bar
lines of code (new/cumulative) Blog Volume (Add/accumulate) Learning Time (new/cumulative) Important Growth
Goal 5000 rows 30 Articles 400 hours
First week 100/100 2/2 10/20
    • Planned study time: 20 hours

    • Actual learning time: 10 hours

    • Improved situation: Gradual replenishment

Resources
    • Use the Code cloud and blog Park to learn a simple tutorial

20165103 2017-2018-2 "Java Programming" 1th Week study Summary

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.