20172333 2017-2018-2 "Java Programming" 10th Week study Summary

Source: Internet
Author: User

20172333 2017-2018-2 "Java Programming" 10th Week study Summary Textbook Learning Content 13th Chapter
    1. A collection is an object, a database that holds other objects.
    2. Collections can hold different kinds of objects and can hold objects of the same type, which are divided into heterogeneous and isomorphic.
    3. Generics are a feature of programming languages. Allows programmers to define variable parts when writing code in a strongly typed programming language, which must be specified before they are used.
Problems in code debugging and the resolution process
    • [x] Issue 1: During the writing of PP11.2, the Try-catch statement is placed under the while statement although the exception is successfully caught, but the while statement cannot be looped. Figure
    • resolution Process : Later examining found not to use while loop, but after doing it can quit the teaching materials learning problems and the solution process
    • [x] question 1: What is the relationship between generics and the Java Collection Class API?
    • workaround : Generics are primarily used to define sets of undefined types in a collection class, preventing objects of different types in a collection
    • [x] Question 2: The difference between hashcode () and Equals ()
      resolution process : Figure
Code Hosting

(run result of statistics.sh script)

Last week's summary of the wrong quiz

A recursive method without a base case leads to infinite recursion.:

A. True

B. False

Answer: A, I choose b.

Parsing: If you do not process the end of the loop, it will result in recursive infinite loops.

2.The following method correctly adds-ints, returning their sum:

public int Add (int a, int b)

{

return (b > 0)? Add (A+1, b-1): A;

}:

A. True

B. False
Answer: B, I chose a.

Parse: Failed when b<0.

The following method correctly multiplies, ints so long as both is non-negative:

public int mpy (int a, int b)
{
return (b > 0)? A + mpy (A, b-1): 0;
}:

A. True

B. False
Answer: A I chose B.

Parse: As long as these two are not negative, you can run normally.

Comments:
    • Blogs that are worth learning or questions:

      When using the MATH.SQRT (double num) method, the idea error says that NUM should be of type int, and the book also says that either the output sqrt or the input num should be double type.

After encountering the problem, the data review and related changes, it is worth my study.

    • Something worth learning or doing in your code:
      The notes are organized and organized when you make Git commit.
reviewed the classmates blog and code
    • This week's study of the knot
      • 20172330 Linan
      • Pair of photos
      • Pairs of learning content
        • Rich commit content worth learning
        • The problem and the method of handling records are concise and clear.
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 125/125 2/2 20/20
Second week 269/394 2/4 Unknown/38
Third week 477/920 1/5 x/x
Week Four 1179/2338 1/6 --
Week Five 1131/3154 1/7 ? /?
Week Six 1448/4008 1/8 ? /??
Seventh Week 957/4840 2/10 ? /???
Eighth Week 1093/5933 2/12 ? /????
Nineth Week 739/6672 2/14
Tenth Week 702/7374 1/15
Other (sentiment, thinking, etc., optional)

No

Resources

Errors and exceptions, the difference between the two is introduced

Java Try-catch and looping issues

20172333 2017-2018-2 "Java Programming" 10th 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.