201671010130 2016-2017-2 "Java Programming" second week study summary

Source: Internet
Author: User

Learn Java Chapter Three summary

This week I learned:
  1. The first is to resolve the error before running the program "editor dose not contain a main type" program cannot run "problem, through the Netizen's blog http://blog.csdn.net/huazhangena/article /details/7349044, the cause of this problem is that the main class file we built is not placed under the compiler access path, that is, the default path under the project non-default source program folder under the source program is saved, the solution is to refactor the program's compilation path.
  2. Now I can be quiet to use the Java environment Eclipse (just when you really feel the heart is very impetuous), learned to use the shortcut key (alt+/) can appear after the class of the use of all the specifications of the method according to the prompt we can correctly and efficiently obtain the method where the number and type of variables required , you can see the type of result returned at a glance .
  3. According to the exercise and courseware, know the standard input and output form, I think at this point and C language is very different, C input and output needs to import IO (standard input and output) function, Implementing the input in Java requires importing the Java.util package first, because the scanner class that constructs a scanner object is defined in the package, the output is not required, and the output only needs to call SYSTEM.OUT.PRINTLN.
  4. There is a special class in Java that can be used with Java.math: BigInteger and BigDecimal, which satisfies the problem of insufficient integers and floating-point precision, which requires methods such as add and multiple of large numeric classes.
  5. There are two ways to initialize arrays in Java, with particular attention to the ability to allow array lengths of 0 and (null) to be different.
  6. New is a construction method for assigning the appropriate memory to an object.
  7. It is worth mentioning that: Java is a special focus on case, so write programs must be cautious.
  8. Because I do not understand the topic Scanner in = new Scanner (New File ("MyFile.txt")), Scanner class and in relationships, see today a comment explaining: "Suppose a human (Scanner), who is this human (in), After creating a human new Scanner (system.in), System.in is the character of this person ", so the sentence is interpreted as: Create a new input to get the Scanner object and assign it to in. Would it be appropriate for me to ask the teacher for this statement?

201671010130 2016-2017-2 "Java Programming" second 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.