Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6876709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:30:42+00:00 2026-05-27T04:30:42+00:00

Whats up? I’ll keep it short and sweet. How can I determine if two

  • 0

Whats up?

I’ll keep it short and sweet.
How can I determine if two classes are the same type.
By type I mean if they are both defined as a Class, Interface, Enum, Annotion or whatever.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:30:42+00:00Added an answer on May 27, 2026 at 4:30 am

    The following methods are available on java.lang.Class:

     boolean    isAnnotation() 
              Returns true if this Class object represents an annotation type.
     boolean    isAnnotationPresent(Class<? extends Annotation> annotationClass) 
              Returns true if an annotation for the specified type is present on this element, else false.
     boolean    isAnonymousClass() 
              Returns true if and only if the underlying class is an anonymous class.
     boolean    isArray() 
              Determines if this Class object represents an array class.
     boolean    isAssignableFrom(Class<?> cls) 
              Determines if the class or interface represented by this Class object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified Class parameter.
     boolean    isEnum() 
              Returns true if and only if this class was declared as an enum in the source code.
     boolean    isInstance(Object obj) 
              Determines if the specified Object is assignment-compatible with the object represented by this Class.
     boolean    isInterface() 
              Determines if the specified Class object represents an interface type.
     boolean    isLocalClass() 
              Returns true if and only if the underlying class is a local class.
     boolean    isMemberClass() 
              Returns true if and only if the underlying class is a member class.
     boolean    isPrimitive() 
              Determines if the specified Class object represents a primitive type.
     boolean    isSynthetic() 
    

    Take your pick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whats wrong with my buttons? here http://hiddenbrookstudio.com/index.swf , see how they rollover and dissappear
Whats the worst that can happen if I drop existing indexes in SQL Server
Whats the difference(,adv/disadv) in the two ways of initialing a string variable in ios?
Whats wrong with the below page? <html> <head> <script type=text/javascript> function openWin(url, w, h)
Whats this syntax useful for : function(String... args) Is this same as writing function(String[]
Whats the other option we can use for multiple inheritance other than implementing interface
Whats the best design pattern to use for LINQ and type tables that exist
whats the difference between these two access methods? nodes->at(235).push_back(NavigationNode(NULL,0,0)); nodes[235].push_back(NavigationNode(NULL,0,0)); second one gives this
Whats does indexing mean? How it is useful to a web crawler?
Whats wrong with the following script http://rise4fun.com/Z3Py/Cbl ? Adding the last two lines gives

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.