protected
修饰符,一种可见性修饰符,当一个变量或者方法声明为protected
可见性时,就能够被子类所引用。不光如此,同一个包里的其余任何类也可使用。super
引用,相似this
引用,使用super
引用能够调用父类的构造方法。可见性究竟是什么
书上讲的不甚详细,百度一下也不知所云,找了很久,找到这么一句话html
可见性体现了方法和实例变量对其余类和包的访问控制git
也就是说,这个属性决定了这个方法或变量能被哪一种类引用?又有下图:
这下就理解的稍微好一点了程序员
问题1:全部的硬币面值必定相同,这显然不对劲,单个读取时甚至出现了
-1
数组
问题1解决方案:初步检查:代码中发现BUG,误用
indexof()
,应该使用get()
才对。
可是尚未彻底解决
面值相同的问题依然存在,因而我在其中加入了一个face
的从新随机操做问题迎刃而解。
数据结构
(statistics.sh脚本的运行结果截图)学习
错题1: In Java, arrays are
正确答案:B .objects
缘由:英语水平太低。this
错题2:If x is a char, and values is an int array, then values[x]
正确答案:D .casts x as an int based on x's ASCII value (for instance, if x is 'a' then it uses 97 and if x is 'z' then it uses 122)
缘由:数组索引若是是char
,按照ASCII码表对应数字取int
值命令行
错题3:If a and b are both int arrays, then a = b; will
正确答案:A .create an alias
缘由:理解错误,误觉得二者相同就是将b中的全部对象复制到a中去。设计
错题4:When comparing any primitive type of variable, == should always be used to test to see if two values are equal.
正确答案:B .false
缘由:对于浮点型不能这样使用。3d
错题5:A Java main method uses the parameter (String[ ] variable) so that a user can run the program and supply "command-line" parameters. Since the parameter is a String array, however, the user does not have to supply any parameters.
正确答案:A .true
缘由:程序员(操做者)能够不输入命令行参数,咱们日常就没有输入。
代码行数(新增/累积) | 博客量(新增/累积) | 学习时间(新增/累积) | 重要成长 | |
---|---|---|---|---|
目标 | 5000行 | 30篇 | 400小时 | |
第一周 | 195/195 | 1/4 | 20/20 | 对代码产生了很大兴趣 |
第二周 | 309/504 | 1/5 | 20/40 | 打字速度明显提高 |
第三周 | 311/815 | 2/7 | 25/65 | 无 |
第四周 | 474/1289 | 1/8 | 30/95 | 抗...抗压能力增强? |
第五周 | 260/1549 | 1/9 | 15/110 | 了解到预习的重要性 |
第六周 | 358/1907 | 2/11 | 20/130 | 打字速度明显提高 |
第七周 | 780/2687 | 2/13 | 15/145 | 学会使用JUnit |
(在博客下评论)