Java Programming Chapter 4——Class loading

Class loading

1. Concept: When the JVM uses a class for the first time, it finds the corresponding class file through the classPath, and obtains the relevant information of the class (package name, class name, parent class, properties, methods, etc.) from the class file, and the class stored in the JVM is loaded only once.

2 . Timing of class loading

(1) When an object of a class is created for the first time, the class is loaded first. Re-creating an object.

(2) Using static members (static attributes and static methods) in a class for the first time will lead to class loading.

(3) Subclass class loading will lead to class loading of its parent class: Creating a subclass object for the first time will use the static attributes and static methods of a subclass for the first time.

相关推荐
霸道流氓气质11 分钟前
Spring AI 技术细节:VectorStore 多库统一抽象
java·人工智能·spring
今天AI了吗12 分钟前
Codex 配置自定义 AI API 完整指南:从零到一接入你的专属模型
java·人工智能·python·数据分析·embedding
Tanjia_kiki17 分钟前
谷歌浏览器中F12编辑并重发请求
开发语言·前端·javascript
程序猿编码20 分钟前
基于GGML的C++17轻量化语音推理引擎:说话人识别与语音分析技术全解析
开发语言·c++·pytorch·深度学习·神经网络·大模型
学长毕业设计32 分钟前
基于SpringBoot的健康食谱管理系统的设计与实现(源码+文档+讲解视频)
java·spring boot·后端
珍珠先生33 分钟前
P10 · 缺 MySQL 驱动 jar:ClassNotFoundException: com.mysql.cj.jdbc.Driver
java
pnoker1 小时前
从工业软件到 AI 智能体:工业 AIoT 技术路线的系统梳理
java·人工智能·物联网·microsoft·开源·工业互联网
传奇开心果编程1 小时前
【Rust入门知识点学与练】第5课:函数
开发语言·学习·rust
秋田君1 小时前
Qt_QMediaPlayer类与QMediaPlaylist类
开发语言·qt
专注仿真1 小时前
Vapor框架构建及Swift for TensorFlow图像分析
java·其他