Java基础13:反射与注解详解 什么是反射? 反射(Reflection)是Java 程序开发语言的特征之一,它允许运行中的 Java 程序获取自身的信息,并且可以操作类或对象的内部属性. Oracle官方对反射的解释是 Reflection enables Java code to discover information about the fields, methods and constructors of loaded classes, and to use reflected fi…
变量定义 public class Main { public static void main(String[] args) { // 定义byte类型的变量 byte b = 10; System.out.println(b); // 定义short类型的变量 short s = 100; System.out.println(s); // 定义int类型的变量 int i = 1000; System.out.println(i); // 定义long类型的变量 long l = 1000…