Tuesday, June 23, 2009

How to Get the Superclass of an Object


Object o = new String();
Class superClass = o.getClass().getSuperclass(); // java.lang.Object

1 comments:

Ilango on August 7, 2009 at 7:47 AM said...

I stumbled on your blog at the JavaPassion List. I like this blog.IT is informative and nicely laid out. One quick question about the layout template:
It is not a standard Blogger Template, right? Where did you get it from? I have a blog and would like to apply a different template to it, other than the standard ones available from blogger.

Your help is appreciated. Meanwhile great work on the technical stuff. I am going to follow your blog

 

Sample Java Codes Copyright © 2008 Green Scrapbook Diary Designed by SimplyWP | Made free by Scrapbooking Software | Bloggerized by Ipiet Notez