Solved

Check if an Interface a Collection interface

Posted on 2004-10-15
1
194 Views
Last Modified: 2010-03-31
If I have gotten an a particular interface from an array of class1.getInterfaces().  How do I check to see if this interface is the interface java.util.Collection?
0
Comment
Question by:bcsmess
1 Comment
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 12325285
if (cls==Collection.class)
{
}
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
print map entry 34 72
servlet  URL Rewriting 1 42
windows explorer path to command prompt 5 54
pagenation logic how it is working in my code 1 53
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question