Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我们将扫描仪创建为私有的会发生什么
private Scanner s=new Scanner(System.in)
它是否受到保护?为什么?
如果将其设为私有,则它仅在声明它的类中可见。谷歌“访问修饰符”