File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "interface" Watch "interface" New topic
Author

interface

vanya khanduri
Greenhorn

Joined: Jan 23, 2001
Posts: 3
can a method in an interface be declared static??? why???
Val Dra
Ranch Hand

Joined: Jan 26, 2001
Posts: 439
They can be but they implicitly static


Val SCJP <BR>going for SCJD
Stephen Joseph
Ranch Hand

Joined: Dec 29, 2000
Posts: 50
Methods in the Interface are abstract implicitly and they have to be implemented in some class which will be accesed by objects
(instances)
By making the methods static we mean that it belongs to a class and not any instances and so I think that both abstract and static cant be used together as it will defy the purpose of the interfaces(to be implemented by classes)

Thank you
Steven
Val Dra
Ranch Hand

Joined: Jan 26, 2001
Posts: 439
i made a mistake interface mmethods cannot be static becaue object must implement them.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: interface
 
Similar Threads
How To Call Two Different Classes From the Main Program Using the Same API?
Home interface or Home Interface stub
Writing an Interface
Time Capsule
what results byte code in java