Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Finding out the super class name of the class

                         

Here we show you the way to find out the Superclass name by using the getSuperclass() method. The given example demonstrates the use of getSuperclass() method in more detail.

Create a class "Fsupercls". Po
pulate it with the Checkbox objects. Now retrieve the Superclass name by using the getSuperclass() method.

Here is the code of the Example :

Fsupercls.java: 

import java.lang.reflect.*;
import java.awt.*;

public class Fsupercls  {
     public static void main(String[] args) {
       Checkbox big = new Checkbox();
       printName(big);
     }
     static void printName(Object objct) {
     Class cls = objct.getClass();
     Class sup = cls.getSuperclass();   
     System.out.println(sup);
     }
}

Here is the output of the Example :

C:\roseindia>javac Fsupercls.java

C:\roseindia>java Fsupercls
class java.awt.Component

Download this Example:

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Latest Searches:
jpanel
Java example program t
where class files are
TextArea Frame in Java
AppletInJsp
scrolling system tray
sybase create command
how to upload image ur
insert content to text
Photoshop Effects Blue
insert data to text fi
pass param from onr js
ajax auto complete
tiles 2 spring
Eclipse 3.4 EJB
д??????д?????д????Ð
Convert Integer to Flo
Photoshop Text Effects
source code for chat p
distributed cache upda
checkbox in jsp
block list software co
resultset classes
updatetable
Building a Simple EJB
joining
Copy one or more files
btreeimplementation
FreeMarker FreeMarker
how to insert date val
begining to rdbms
Photoshop Textures and
login creation using j
OutStream
Photoshop Photo Effect
select a row of data t
list is sorted or not
javaexampleprogramuseo
GNATbench
Thread Sleep Method
swings ioc
show current directory
MemoryImageSource(widt
standard
<s:push> in struts2
how to edit a any file
AOP Example Spring
HelloWorld.shtml
swing Jlabel
JNDI tutorial'
java file browser
url redirecting in ser
Servlet Context
sample program toTake
strtuts2
Java property file
byte files
json lib/componen...]=
comparator
Transaction?
Photoshop Photo Effect
google
code for frames using
visible
С?в??в??С?в???С?
adding hibernate tools
create xml using java
web application tomcat
array element in php
UIData
Working with EHCache
sample code
input two files
Struts 2 File Upload
saveOrUpdatefaces
class not found
given list is sorted
program to explain the
JSLT Example
what is Ice Faces
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.