当前位置:网站首页>Internal class ~ lock ~ access modifier

Internal class ~ lock ~ access modifier

2022-06-27 08:31:00 C_ x_ three hundred and thirty

A container class data structure , Read write average , Use the lock mechanism to ensure thread safety . If you want to comprehensively improve the access performance of the data structure , The best way is ( Section locking )

Lock only where it affects reading and writing , The lock can be read-write , Can improve efficiency

ArrayList list = new ArrayList(20); Medium list Expand it a few times   0 Time  

Arraylist The default array size is 10, The size after expansion is the size before expansion 1.5 times , Less than the maximum Integer The maximum value of minus 8, If the newly created set has an initial value , The default is the incoming size , There will be no expansion

According to the following code snippet , What is correct in the following statement is (    ).

public class Parent {

    private void m1(){}

    void m2(){}

    protected void m3(){}

    public static void m4(){}

}


 Subclasses must be able to inherit and override Parent Class m1 Method 
 Subclasses must be able to inherit and override Parent Class m2 Method 
 Subclasses must be able to inherit and override 
原网站

版权声明
本文为[C_ x_ three hundred and thirty]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/178/202206270823529670.html