访问修饰符public, private, protected, 以及不写(默认)时的区别是什么?

答案解析

public所有类可见,protected同包和子类可见,private仅本类可见,默认同包可见。