欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

.getClass 返回class名

程序员文章站 2022-07-16 22:42:15
...
package test;

public class test2 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		test2 abc = new test2();
		System.out.println(abc.getClass());
	}

}

返回 class test.test2