getClass()
代码:
package cn.tedu.object;

public class ObjectDemo2 {
public static void main(String[] args) {
//创建对象
ObjectDemo2 od2=new ObjectDemo2();
//全路径名—包名+类名
//实际创建类的类型
System.out.println(od2.getClass());
}
}
输出:
class cn.tedu.object.ObjectDemo2

代码图:
getClass()

相关文章:

  • 2021-06-08
  • 2021-12-18
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-12-03
  • 2021-04-20
猜你喜欢
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案