20165301 2017-2018-2 "Java Programming" Fifth Week study summary

Source: Internet
Author: User

20165301 2017-2018-2 "Java program design" Fifth week study summary textbook Learning content Summary seventh: Inner class and Exception class
    • Inner class
    • Defining another class in one class
    • Non-intrinsic class is not a static class
    • Anonymous class
    • A subclass removes the class-declaration-body
    • Create an object with a subclass of bank (anonymous class)
      new Bank(){ 匿名类的类体 }
    • Anonymous classes related to interfaces
      new Computable(){ 实现接口的匿名类的类体 }
    • Exception class
    • The exception object can call the following method to get or output information about the exception
      public String getMessage(); public void printStackTrace(); public String toString();
    • Try-catch statements
      • If a return statement is executed in the Try-catch statement, then the finally child statement is still executed
      • The program exit code is executed in the Try-catch statement, that is, execution of System.exit (0), and the finally child statement is not executed
    • Assertion
Tenth chapter: input, Output stream
    • File class
    • Create a method for constructing a file object where filename is the name of the document, DirectoryPath is the path to the file, and Dir is a directory:
File(String filename);File(String directoryPath,String filename);File(File dir,String filename);
    • Buffered streams
    • Output stream: The Read and write methods of the character input stream and output stream use a character array to read the data
    • Use scanner to parse a file, create a dialog box with JFileChooser
Code Hosting

(run result of statistics.sh script)

Learning progress Bar
lines of code (new/cumulative) Blog Volume (Add/accumulate) Learning Time (new/cumulative) Important Growth
target 5000 Line 30 400 hours
first week 11/11 1/1 4/4
second week 286/297 2/3 6/10
third week 722/1004 1/4 10/20
fourth week 421/1425 1/5 10/30
fifth week 829/2283 1/6 10/40

20165301 2017-2018-2 Java programming Fifth week of 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.