博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
# java学习笔记 2020 2/13(十四)慕课网 Java 中的静态内部类
阅读量:3948 次
发布时间:2019-05-24

本文共 280 字,大约阅读时间需要 1 分钟。

java学习笔记 2020 2/13(十四)慕课网 Java 中的静态内部类

静态内部类是 static 修饰的内部类,这种内部类的特点是:

1、 静态内部类不能直接访问外部类的非静态成员,但可以通过 new 外部类().成员的方式访问

2、 如果外部类的静态成员与内部类的成员名称相同,可通过“类名.静态成员”访问外部类的静态成员;如果外部类的静态成员与内部类的成员名称不相同,则可通过“成员名”直接调用外部类的静态成员

3创建静态内部类的对象时,不需要外部类的对象,可以直接创建 内部类 对象名= new 内部类();

在这里插入图片描述

看到最后的帮忙点个👍🙏 谢谢!
在这里插入图片描述

转载地址:http://baqwi.baihongyu.com/

你可能感兴趣的文章
Creating a Custom Account Type 创建自定义帐户类型
查看>>
Sending Content to Other Apps 将内容发送到其他应用程序
查看>>
Receiving Content from Other Apps 接收来自其他应用程序的内容
查看>>
Adding an Easy Share Action 添加一个简单的共享行动
查看>>
Taking Photos Simply 简单地拍摄照片
查看>>
Recording Videos Simply 简单录制视频
查看>>
Controlling the Camera 控制相机
查看>>
Creating Multiple APKs for Different API Levels 创建多个不同的API级别的APK
查看>>
Creating Multiple APKs for Different Screen Sizes 创建多个APKs为不同的屏幕尺寸
查看>>
Creating Multiple APKs for Different GL Textures 创建多个APK给不同的GL结构
查看>>
Android Package and Manifest File
查看>>
Creating Multiple APKs with 2+ Dimensions 创建两种以上屏幕尺寸多apk支持
查看>>
Abstracting the New APIs 抽象出新的API
查看>>
Proxying to the New APIs 代理新的API
查看>>
Creating an Implementation with Older APIs 用较早版本的APIs实现抽象类
查看>>
Using the Version-Aware Component 使用版本识别组件
查看>>
Enhancing Security with Device Management Policies 加强安全与设备管理策略 Developing for Enterprise
查看>>
Advertising without Compromising User Experience 不降低用户体验的广告
查看>>
Planning Screens and Their Relationships 规划屏幕和它们的关系
查看>>
Planning for Multiple Touchscreen Sizes 规划多个触摸屏尺寸
查看>>