• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

abstract Interface

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how a interface can be abstract???see the javax.ejb package and there is an interface like that
public abstract interface EJBObject
extends java.rmi.Remote
can any one explain what does it mean
Aamir
[This message has been edited by Aamir Khan (edited November 07, 2000).]
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The signature for EJBObject is just
public interface EJBObject extends java.rmi.Remote.
Please check this site http://java.sun.com/j2ee/j2sdkee/techdocs/api/javax/ejb/EJBObject.html.

Chitra
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An abstract class is one which can not be created, but must be extended first. An abstract interface is one which can not nbe implemented, but must be extended first. Consider the following example:
 
Aamir Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Frank , I got it now.
Aamir
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank, Sorry to say that you are worng.
Look at this program
abstract interface B{
public void doB();
}
interface C{
public void doC();
}
public class A implements B,C{
public void doB(){
System.out.println("I am B");
}
public void doC(){
System.out.println("I am C");
}
public static void main(String arg[]){
A ob = new A();
ob.doB();
ob.doC();
}
}
This program works perfectly fine.
As per the java language specs 9.1.2.1
Every interface is implicitly abstract and this modifier is
obsolete and should not be used in new Java programs.
I executed the above example using jdk1.2
Thanks,
Naveen.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic