⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 packagevisibility.java

📁 绝对经典!好动西和大家一起分享 呵呵 你们不应该如此限制的,不好
💻 JAVA
字号:
/* This example demonstrates "default package visibility". * Foo is defined in the same directory as PackageVisibility. * Thus, only the Foo private attribute privateInt is really * private. PackageVisibility sees all three other variables. */public class PackageVisibility{    public static void main(String args[])    {	Foo foo = new Foo();	int fooPublic = foo.publicInt;	     // public	int fooPackage = foo.packageInt;     // package	int fooProtected = foo.protectedInt; // default package	// Following is not visible, would cause compiler error//      int fooPrivate = foo.privateInt;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -