面试题:
5、switch语句能否作用在byte上,能否作用在long上,能否作用在String上?
"byte,short,char都可以隐含转换为int,所以可以,long和String不能转为int,所以不能"
作用域 当前类同一package 子孙类其他package
public √ √ √ √
protected √ √ √ × 记忆方法:因为public最大,所以带p第二牛逼
friendly √ √ × × 记忆方法:同一包的同一级别的类
private √ × × ×