zoukankan      html  css  js  c++  java
  • 201871010106丁宣元 《面向对象程序设计(java)》第六—七周学习总结

                                                                       201871010106-丁宣元 《面向对象程序设计(java)》第六—七周学习总结

    正文开头

    项目

    内容

    这个作业属于哪个课程

    https://www.cnblogs.com/nwnu-daizh/

    这个作业的要求在哪里

    https://www.cnblogs.com/nwnu-daizh/p/11605051.html

    作业学习目标

    1. 深入理解程序设计中算法与程序的关系;
    2. 深入理解java程序设计中类与对象的关系;
    3. 理解OO程序设计的第2个特征:继承、多态;
    4. 学会采用继承定义类设计程序(重点、难点);
    5. 能够分析与设计至少包含3个自定义类的程序;
    6. 掌握利用父类定义子类的语法规则及对象使用要求。

     正文内容

    第一部分:总结第五章理论知识

      5.1 类、超类和子类

        1.继承:(1)用已有类来构建新类的一种机制。当一个新类继承了一个类时,这个新类就继承了这个类的方法和域,可以在新类中添加新的方法和域。eg:Empolyee,manager在Empolyee的情况下有奖金,即新方法和域。

     

              (2)继承的特点:具有层次结构,子类继承父类的域和方法。

              (3)继承的优点:代码可重用性,父类的域和方法可用于子类,设计应用程序变得更加简单,可以轻松定义子类。

           (4)语法格式:class 新类名   extends  已有类名   子类比超类拥有的功能更加丰富

              已有类也称超类(superclass),基类(base class),父类(parent class)

              新类也称子类(subclass),派生类(derived class),孩子类(child  class)

            通过扩展超类定义子类时,仅需指出不同,子类中可以增加覆盖但不可删除

            若子类没有显示的调用超类的构造器,则自动调用超类默认构造器

         (5)子类的构造器不能直接访问超类的私有域,必须调用超类构造器,且必须是第一条语句。

         (6)super:一个指示编译器调用超类方法的特有关键字,不是一个对象的引用,不能将super赋给另一个对象变量。

                  两个用途:调用超类的方法(格式:super.方法名())

                    调用超类的构造器(格式:super() )

            子类不继承父类的构造方法,用super调用。覆盖只能在不同的类中完成。        

        2.继承层次:

          (1)定义:从一个超类扩展而来的类集合称为层次继承。

          (2)Java不支持多继承:一个父类可以有多个子类,一个子类只能有一个父类。

        3.多态性:

          (1)定义:泛指在程序中同一个符号在不同情况下具有不同解释

                超类中定义的域或方法,被子类继承之后,可以具有不同的数据类型或表现出不同的行为,这使得在超类及其子类中同名的域或方法具有相同的语义。超类中的方法在子类中可方法重写。

        4.抽象类:

                 a.定义:

            abstract   class   Person

            {

                public  abstract  String  getDescription();

              ......                       

            }      

              abstract  方法,只能声明,不能实现

          b.

               (1)为了提高程序的清晰度,包含一个或多个抽象方法的类本身必须被声明为抽象类。抽象类可以包含具体数据和具体方法

        (2)抽象方法充当着占位的角色,它们的具体实现在子类。扩展抽象类有两种选择:一在子类中实现部分抽象方法,这样就必须将子类也标记为抽象类;二实现全部抽象方法,这样子类就可以不是抽象类。类即使不含抽象方法,也可以将类声明为抽象类。

        (3)抽象类不能被实例化,即不能创建对象,只能产生子类。

          5.动态绑定:

              a.定义:也称为运行时绑定,程序在运行时会自动选择调用哪个方法。

          eg:public class Son extends Father

                                {...}

                               Son son=new Son();

            son.method();

              b.执行过程:以上述为例

           编译器检查对象的声明类型和方法名,搜索相应类(Son)及其父类(Father)“方法表”,找出所有访问属性为public的method方法。

       ->编译器检查方法调用中提供的参数类型,找出一个完全匹配的方法,称为重载解析。

      ->如果方法是private、static、final修饰的,或者是构造器,那么编译器能准确地判断应该调用哪个方法,即静态绑定。

      ->程序运行时,如果Son中定义了mothod()方法,直接调用子类中的相应方法;如果没有定义,则在父类中寻找method()的方法。

          动态绑定中每一次调用方法都要进行搜索,时间花费大。因此虚拟机预先为每个类创建了一个方法表,列出了所有方法的签名和实际调用的方法。方法的签名:方法的名称和参数列表称为方法的签名

       6.阻止继承:final类和方法

                 不允许继承的类称为final类,在类的定义中用final修饰符

           类中的方法定义为final,子类就不能覆盖该方法

                如果一个类声明为final,属于它的方法会被自动设为final,但不包括域

      7.强制类型转换

      (1)把一个超类对象赋给一个子类对象变量,就必须进行强制类型转换。

                           语法:子类   对象= (子类)  (超类对象)

                   类型转换必须在继承层次内进行,超类转换为子类之前,先用instanceof操作符进行继承链检查。(少使用)

      注:

      (1)封装、继承你和多态性是面向对象的主要特征;

      (2)继承可提高代码的重用性,用extends关键字来实现。

      (3)继承建立了类与类之间的关系,也是多态特征的前提

      (4)支持单继承,不直接支持多继承

      (5)abstract修饰符的抽象类不能被实例化为对象,只能扩展子类。抽象类中的抽象方法充当着占位的角色,它们的具体实现在子类中。

      (6)final类不允许被继承;类中final 方法不允许被子类重写。

           (7)权限访问修饰符

       5.2 Object:所有类的超类

         1.Object类是Java中所有类的祖先——每一个类都由它扩展而来。可以使用类型为Object的变量指向任意类型的对象。但要进行强制类型转换。

                      2.equals方法:检测某个对象是否同另一个对象相等。判断两个对象是否相等的引用:如果有相同的引用,是相等的;

          定义子类的equals方法:super. equals (otherObjecct)

            3.hashCode方法:hashCode方法导出某个对象的散列码。两个相等对象的散列码相等。

         4.toString方法:toString方法返回一个代表该类对象域值的字符串

            定义:super.toString()

      5.3 泛型数组列表

          1.ArrayList类,可允许程序在运行时确定数组的大小;

                     2.ArrayList是一个采用类型参数的泛型类。为指定数组列表保存元素的对象类型,需要用一对尖括号将数组元素的对象类名括起来加在后面;

                          3.数组列表的操作:

                                     定义:ArrayList<T> 对象 = new ArrayList<T>()

            API:ArrayList的构造器     添加新元  统计个数   调整大小  访问     增加与删除

           5.4 对象包装器和自动打包

        a所有基本数据类型都有与之对应的预定义类,被称为对象包装器。

             b对象包装器类是不可变的,一旦构造了包装器,不允许更改值

             c好处:基本类型转换为对象 ,定义一些有用的基本方法(static方法)

        d自动打包:自动的将基本数据类型转换为包装器类的对象

          5.5 参数变量可变的方法:用户自己可以定义可变参数的方法,并将参数指定为任意类型,甚至是基本类型

          5.6 枚举类

        (1)声明枚举类:public    enum  Grade{A、B、C、D、E}

               注:枚举类是一个类,它的隐含超类是java.lang.Enum。

           枚举值并不是整数或其它类型,是被声明的枚举类的自身实例

          不能有public修饰的构造函数,构造函数都是隐含private,编译器自动处理。

          隐含都是由public、static、final修饰的,无须自己添加这些修饰符。

          比较两个枚举类型的值时,不需要调用equals方法,直接使用“==”。

       5.7 继承设计的技巧

        将公共操作和域放在超类。

        不要使用受保护的域。

        使用继承实现“is-a”关系。

        除非所有继承的方法都有意义,否则就不要使用继承。

        在覆盖方法时,不要改变预期的行为。

        使用多态,而非类型信息。

    第二部分:实验部分

      1.实验目的与要求

         (1) 理解继承的定义;

         (2) 掌握子类的定义要求

         (3) 掌握多态性的概念及用法;

         (4) 掌握抽象类的定义及用途。

      2.实验内容和步骤

      实验1:导入第5章示例程序,测试并进行代码注释。

          测试程序1

    Ÿ       在elipse IDE中编辑、调试、运行程序5-1 —5-3(教材152页-153页) ;

    Ÿ       掌握子类的定义及用法;

    Ÿ       结合程序运行结果,理解并总结OO风格程序构造特点,理解Employee和Manager类的关系子类的用途,并在代码中添加注释;

    Ÿ       删除程序中Manager类、ManagerTest类,背录删除类的程序代码,在代码录入中理解父类与子类的关系和使用特点。

                 1.程序代码

          5-1MangerTest.java

    package inheritance;
    
    /**
     * This program demonstrates inheritance.
     * @version 1.21 2004-02-21
     * @author Cay Horstmann
     */
    public class ManagerTest 
    {
       public static void main(String[] args)
       {
          // construct a Manager object
          var boss = new Manager("Carl Cracker", 80000, 1987, 12, 15);
          boss.setBonus(5000);  //bouns在Manager类中初值为空,用更改器改为5000
    
          var staff = new Employee[3];  //构造器
    
          // fill the staff array with Manager and Employee objects
    
          staff[0] = boss;     //父类对象可以引用子类对象
          staff[1] = new Employee("Harry Hacker", 50000, 1989, 10, 1);
          staff[2] = new Employee("Tommy Tester", 40000, 1990, 3, 15);
    
          // print out information about all Employee objects
          for (Employee e : staff)
             System.out.println("name=" + e.getName() + ",salary=" + e.getSalary()); //多态性质
       }
    }

         5-1Employee.java

    package inheritance;
    import java.time.*;
    
    public class Employee
    {
       private String name;     //创建三个私有属性
       private double salary;
       private LocalDate hireDay;
       public Employee(String name, double salary, int year, int month, int day)
       {
          this.name = name;
          this.salary = salary;
          hireDay = LocalDate.of(year, month, day);
       }
    
       public String getName()
       {
          return name;
       }
    
       public double getSalary()
       {
          return salary;
       }
    
       public LocalDate getHireDay()
       {
          return hireDay;
       }
    
       public void raiseSalary(double byPercent)
       {
          double raise = salary * byPercent / 100;
          salary += raise;
       }
    }

       5-1Manger.java

    package inheritance;
    public class Manager extends Employee   //extends继承
    {
       private double bonus;//私有域
    
       /**
        * @param name the employee's name
        * @param salary the salary
        * @param year the hire year
        * @param month the hire month
        * @param day the hire day
        */
       public Manager(String name, double salary, int year, int month, int day)
       {
          super(name, salary, year, month, day);//子类对的构造器不能直接访问超类的私有域,必须调用超类构造器,且必须是第一条语句
          bonus = 0;
       }
    
       public double getSalary()
       {
          double baseSalary = super.getSalary();//子类不能直接访问超类的私有域,必须使用共用接口
          return baseSalary + bonus;
       }
    
       public void setBonus(double b)
       {
          bonus = b;
       }
    }

         2.运行结果

                   背录删除类的程序代码

    package inheritance;
    
    public class Manager extends Employee
    {
    
        private double bonus;
    
        public Manager(String name, double salary, int year, int month, int day) {
            super(name, salary, year, month, day);
            // TODO Auto-generated constructor stub
            bonus=0;
        }
    
        @Override
        public double getSalary() {
            double baseSalary = super.getSalary();//子类不能直接访问超类的私有域,必须使用共用接口
            return baseSalary + bonus;
            // TODO Auto-generated method stub
            //return super.getSalary();
        }
    
        /*public double getBonus() {
            return bonus;
        }*/
    
        public void setBonus(double b) {
            //this.bonus = bonus;
            bonus = b;
        }
       
    
       
    }
    package inheritance;
    
    /**
     * This program demonstrates inheritance.
     * @version 1.21 2004-02-21
     * @author Cay Horstmann
     */
    public class ManagerTest
    {
       public static void main(String[] args)
       {
          // construct a Manager object
          var boss = new Manager("Carl Cracker", 80000, 1987, 12, 15);
          boss.setBonus(5000);
    
          var staff = new Employee[3];
    
          // fill the staff array with Manager and Employee objects
    
          staff[0] = boss;
          staff[1] = new Employee("Harry Hacker", 50000, 1989, 10, 1);
          staff[2] = new Employee("Tommy Tester", 40000, 1990, 3, 15);
    
          // print out information about all Employee objects
          for (Employee e : staff)
             System.out.println("name=" + e.getName() + ",salary=" + e.getSalary());
       }

       关系:先有父类,再有子类,先析构子类,再析构父类

        1.子类对象在创建时会首先调用父类的构造函数

        2. 父类构造函数执行结束后,执行子类的构造函数

        3. 当父类的构造函数有参数时,需要在子类的初始化列表中显示调用

        4. 析构函数调用的先后顺序与构造函数相反

      实验1:测试程序2

           编辑、编译、调试运行教材PersonTest程序(教材163页-165页);

    Ÿ       掌握超类的定义及其使用要求;

    Ÿ       掌握利用超类扩展子类的要求;

    Ÿ       在程序中相关代码处添加新知识的注释;

    Ÿ       删除程序中Person类、PersonTest类,背录删除类的程序代码,在代码录入中理解抽象类与子类的关系和使用特点。

             1.程序代码

          5-4PersonTest.java

    package abstractClasses;
    
    /**
     * This program demonstrates abstract classes.
     * @version 1.01 2004-02-21
     * @author Cay Horstmann
     */
    public class PersonTest
    {
       public static void main(String[] args)
       {
          var people = new Person[2];
    
          // fill the people array with Student and Employee objects  用Employee类和Student类填充people数组
          people[0] = new Employee("Harry Hacker", 50000, 1989, 10, 1);
          people[1] = new Student("Maria Morris", "computer science");
    
          // print out names and descriptions of all Person objects打印信息
          for (Person p : people)
             System.out.println(p.getName() + ", " + p.getDescription());
       }
    }

         5-5Person.java

    package abstractClasses;
    
    public abstract class Person  //抽象类Person,包含一个或多个抽象方法的类必须被声明为抽象的
    {
       public abstract String getDescription();
       private String name;//私有属性
    
       public Person(String name)//构造器
       {
          this.name = name;
       }
    
       public String getName()//访问器
       {
          return name;
       }
    }

        5-6Empolyee.java

    package abstractClasses;
    
    import java.time.*;
    
    public class Employee extends Person//子类Employee类继承Person类
    {
       private double salary;
       private LocalDate hireDay;
    
       public Employee(String name, double salary, int year, int month, int day)
       {
          super(name);//子类中直接调用超类中的name
          this.salary = salary;
          hireDay = LocalDate.of(year, month, day);
       }
    
       public double getSalary()
       {
          return salary;
       }
    
       public LocalDate getHireDay()
       {
          return hireDay;
       }
    
       public String getDescription()
       {
          return String.format("an employee with a salary of $%.2f", salary);
       }
    
       public void raiseSalary(double byPercent)
       {
          double raise = salary * byPercent / 100;
          salary += raise;
       }
    }

        5-7Student.java

    package abstractClasses;
    
    public class Student extends Person  //子类Student类继承Person类
    {
       private String major;//私有属性
    
       /**
        * @param name the student's name
        * @param major the student's major
        */
       public Student(String name, String major)
       {
          // pass name to superclass constructor
          super(name);//子类调用超类中的name属性
          this.major = major;
       }
    
       public String getDescription()
       {
          return "a student majoring in " + major;
       }
    }

        2.运行结果

     

           删除程序中Person类、PersonTest类,背录删除类的程序代码

    package abstractClasses;
    
    public abstract class Person
    {
       public abstract String getDescription();
       public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    private String name;
    public Person(String name){
        // TODO Auto-generated constructor stub
       this.name = name;
    }
    }
    package abstractClasses;
    
    /**
     * This program demonstrates abstract classes.
     * @version 1.01 2004-02-21
     * @author Cay Horstmann
     */
    public class PersonTest
    {
       public static void main(String[] args)
       {
          var people = new Person[2];
    
          // fill the people array with Student and Employee objects
          people[0] = new Employee("Harry Hacker", 50000, 1989, 10, 1);
          people[1] = new Student("Maria Morris", "computer science");
    
          // print out names and descriptions of all Person objects
          for (Person p : people)
             System.out.println(p.getName() + ", " + p.getDescription());
       }
    }

        实验1:测试程序3

          编辑、编译、调试运行教材程序5-8、5-9、5-10,结合程序运行结果理解程序(教材174页-177页);

    Ÿ      掌握Object类的定义及用法;

    Ÿ        在程序中相关代码处添加新知识的注释。

        1.程序代码

                  5-8EqualsTest.java

    package equals;
    
    /**
     * This program demonstrates the equals method.
     * @version 1.12 2012-01-26
     * @author Cay Horstmann
     */
    public class EqualsTest  //主类
    {
       public static void main(String[] args)
       {
          var alice1 = new Employee("Alice Adams", 75000, 1987, 12, 15);
          var alice2 = alice1;
          var alice3 = new Employee("Alice Adams", 75000, 1987, 12, 15);
          var bob = new Employee("Bob Brandson", 50000, 1989, 10, 1);
    
          System.out.println("alice1 == alice2: " + (alice1 == alice2));
    
          System.out.println("alice1 == alice3: " + (alice1 == alice3));
    
          System.out.println("alice1.equals(alice3): " + alice1.equals(alice3));
    
          System.out.println("alice1.equals(bob): " + alice1.equals(bob));
    
          System.out.println("bob.toString(): " + bob);
    
          var carl = new Manager("Carl Cracker", 80000, 1987, 12, 15);
          var boss = new Manager("Carl Cracker", 80000, 1987, 12, 15);
          boss.setBonus(5000);
          System.out.println("boss.toString(): " + boss);
          System.out.println("carl.equals(boss): " + carl.equals(boss));
          System.out.println("alice1.hashCode(): " + alice1.hashCode());
          System.out.println("alice3.hashCode(): " + alice3.hashCode());
          System.out.println("bob.hashCode(): " + bob.hashCode());
          System.out.println("carl.hashCode(): " + carl.hashCode());
       }
    }

            5-9Empolyee.java

    package equals;
    
    import java.time.*;
    import java.util.Objects;
    
    public class Employee //用户自定义类
    {
       private String name; //三个私有属性
       private double salary;
       private LocalDate hireDay;
    
       public Employee(String name, double salary, int year, int month, int day)
       {
          this.name = name;
          this.salary = salary;
          hireDay = LocalDate.of(year, month, day);
       }
    
       public String getName()
       {
          return name;
       }
    
       public double getSalary()
       {
          return salary;
       }
    
       public LocalDate getHireDay()
       {
          return hireDay;
       }
    
       public void raiseSalary(double byPercent)//访问器
       {
          double raise = salary * byPercent / 100;
          salary += raise;
       }
    
       public boolean equals(Object otherObject)
       {
          // a quick test to see if the objects are identical 测试几个类是否相同,若引用同一个,则相等
          if (this == otherObject) return true;
    
          // must return false if the explicit parameter is null 若显式参数为空必须返回false
          if (otherObject == null) return false;
    
          // if the classes don't match, they can't be equal若几个类不匹配,则它们不相等
          if (getClass() != otherObject.getClass()) return false;
    
          // now we know otherObject is a non-null Employee  已知otherObject是一个非空雇员
          var other = (Employee) otherObject;
    
          // test whether the fields have identical values 检测是否具有相同的值
          return Objects.equals(name, other.name) 
             && salary == other.salary && Objects.equals(hireDay, other.hireDay);
       }
    
       public int hashCode()//重写hashcode方法,使得相等的两个对象获取的HashCode相等
       {
          return Objects.hash(name, salary, hireDay); 
       }
    
       public String toString()   //其他类型数据转为字符串型的数据
       {
          return getClass().getName() + "[name=" + name + ",salary=" + salary + ",hireDay=" 
             + hireDay + "]";
       }
    }

           5-10Manager.java

    package equals;
    
    public class Manager extends Employee//子类Manager继承Employee
    {
       private double bonus;
    
       public Manager(String name, double salary, int year, int month, int day)
       {
          super(name, salary, year, month, day);//子类调用超类中的属性
          bonus = 0;
       }
    
       public double getSalary()//访问器
       {
          double baseSalary = super.getSalary();
          return baseSalary + bonus;
       }
    
       public void setBonus(double bonus)
       {
          this.bonus = bonus;
       }
    
       public boolean equals(Object otherObject)
       {
          if (!super.equals(otherObject)) return false;
          var other = (Manager) otherObject;
          // super.equals checked that this and other belong to the same class  使用super.equals检查这个类和其他的是否属于同一个类
          return bonus == other.bonus;
       }
    
       public int hashCode() 
       {
          return java.util.Objects.hash(super.hashCode(), bonus);
       }
    
       public String toString()// toString()方法,可自动生成
       {
          return super.toString() + "[bonus=" + bonus + "]";
       }
    }

         2.运行结果

       实验2:编程练习

        定义抽象类Shape:

            属性:不可变常量double PI,值为3.14;

          方法:public double getPerimeter();public double getArea())。

    Ÿ      让Rectangle与Circle继承自Shape类。

    Ÿ         编写double sumAllArea方法输出形状数组中的面积和和double sumAllPerimeter方法输出形状数组中的周长和。

    Ÿ         main方法中

         1)输入整型值n,然后建立n个不同的形状。如果输入rect,则再输入长和宽。如果输入cir,则再输入半径。
         2) 然后输出所有的形状的周长之和,面积之和。并将所有的形状信息以样例的格式输出。
            3) 最后输出每个形状的类型与父类型,使用类似shape.getClass()(获得类型),shape.getClass().getSuperclass()(获得父类型);

              思考sumAllArea和sumAllPerimeter方法放在哪个类中更合适?

      输入样例:

      3

      rect

      1 1

      rect

      2 2

      cir

      1

      输出样例:

      18.28

      8.14

      [Rectangle [width=1, length=1], Rectangle [width=2, length=2], Circle [radius=1]]

      class Rectangle,class Shape

      class Rectangle,class Shape

      class Circle,class Shape

        1.程序代码

             ShapeTest.java

    package shape;
    import java.util.Scanner;
    public class ShapeTest
    {
    
        public static void main(String[] args) 
        {
            Scanner in = new Scanner(System.in);
            String rect = "rect";
            String cir = "cir";
            System.out.print("图形的形状个数:");
            int n = in.nextInt();
            shape[] count = new shape[n];
            for(int i=0;i<n;i++)
            {
                System.out.println("图形形状为:");
                String input = in.next();
                if(input.equals(rect))
                {
                    double length = in.nextDouble();
                    double width = in.nextDouble();
                    System.out.println("Rectangle:"+""+length+"  height:"+width);
                    count[i] = new Rectangle(length,width);
                }
                if(input.equals(cir)) 
                {
                    double radius = in.nextDouble();
                    System.out.println("Circle:"+"redius:"+radius);
                    count[i] = new Circle(radius);
                }
            }
            ShapeTest c = new ShapeTest();
            System.out.println(c.sumAllPerimeter(count));
            System.out.println(c.sumAllArea(count));
            for(shape s:count) 
            {
    
                System.out.println(s.getClass()+",  "+s.getClass().getSuperclass());
            }
        }
    
        public double sumAllArea(shape count[])
        {
             double sum = 0;
             for(int i = 0;i<count.length;i++)
                 sum+= count[i].getArea();
             return sum;
        }
        
        public double sumAllPerimeter(shape count[])
        {
             double sum = 0;
             for(int i = 0;i<count.length;i++)
                 sum+= count[i].getPerimeter();
             return sum;
        }
        
    }

        Shape.java

    package shape;
    
    public abstract class shape {
        public abstract double  getPerimeter();
        public abstract double  getArea();
        double PI = 3.14;
    }

          Rectangle.java

    package shape;
    
    public class Rectangle extends shape{
        private double width;
        private double length;
        public Rectangle(double x,double y) {
             this.width = x;
             this.length = y;
        }
        public double getPerimeter() {
                 double Perimeter = (width+length)*2;
                 return Perimeter;
        }
        public double getArea() {
             double Area = width*length;
             return Area;
        }
    }

          circle.java

    package shape;
    
    public class Circle extends shape{
        private double radius;
        public Circle(double r) {
            this.radius = r;
        }
        public double getPerimeter() {
            double Perimeter = 2*PI*radius;
            return Perimeter;
        }
        public double getArea() {
            double Area = radius*radius*PI;
            return Area;
        }
    }

        2.运行结果

       3. 实验总结:

            通过本次实验,我学会了:1.继承       2.类、超类和子类   3.抽象类  4.学习父类定义子类   5.尝试采用继承定义类设计程序

                 在java的学习过程中,一直存在着问题,就是上课基本可以听懂但下课看书很困难,感觉非常吃力,内容在理解上存在很多问题,很抽象。在实验中先学习理解书中的代码在尝试着编写,理解代码时也遇到了许多困难,有许多不太明白的地方,通过仔细查书,查看代码,进一步加深对知识的理解,基本上完成了代码的理解任务。

            在尝试编写的过程中,上次的问题依然存在,编写很困难。感觉思路似乎很清晰,在编写的过程中不断出现问题,花费了大量的时间。证明知识并未掌握,理解程度不够。要不断练习,不断修改学习方法,多练多想,多尝试。

  • 相关阅读:
    2016年 IT 趋势大预测!
    怎样创建合适的告警处理流程?
    如何解决 Java 安全问题?
    程序员:如何成为一个全栈的工程师?
    安全防护:你是否正在追逐一个不可能实现的目标?
    如何使用 Python 创建一个 NBA 得分图?
    如何对 Android 库进行依赖管理?
    减少 WAF 漏报的 8 种方法 !
    第69节:Java中数据库的多表操作
    第69节:Java中数据库的多表操作
  • 原文地址:https://www.cnblogs.com/budinge/p/11609151.html
Copyright © 2011-2022 走看看