标签:递归
public class Runme { public static void main(String[] args) { Runme rm = new Runme(); rm.getSuperclazz(rm.getClass()); } private Class getSuperclazz(Class clazz) { Class superC = clazz.getSuperclass(); System.out.println("clazz..name: " + clazz.getName()); if (superC == null) { return superC; }else{ return getSuperclazz(superC); } } }
本文出自 “www.bogo.com” 博客,请务必保留此出处http://483181.blog.51cto.com/473181/1929822
标签:递归
原文地址:http://483181.blog.51cto.com/473181/1929822