About interfaces

I've been thinking what are advanteges if using interfaces? I know what they are but when and where to use them? When I know I need to write my own interface and implement it?
[190 byte] By [meev] at [2007-9-27 13:54:41]
# 1

hi,

interfaces are definitions of some methods.

when a class has implemented this interface it is shure that

methods in the class are present.So other class can use the class

as the interfacetype (not knowing the real type of class)

With reflection api you can check if a class implements interface xyz.

implementaion details of the method you not know.(empty methods of course possible)

bye

pitsoft at 2007-7-5 21:43:52 > top of Java-index,Archived Forums,Java Programming...