This page is no longer maintained — Please continue to the home page at

Interfaces and constants - Java interop

No replies
Joined: 2011-09-14,
User offline. Last seen 28 weeks 3 days ago.
Dear All,I have the followings strange case in Java:
public interface LeaseContext<T>  extends {        T getObject();         java.lang.String getUID();}
public interface Lease  {    long FOREVER = 9223372036854775807L;     long ANY = -1L;    int DURATION = 1;    int ABSOLUTE = 2;        long getExpiration();        void cancel() throws, java.rmi.RemoteException;         void renew(long l) throws,, java.rmi.RemoteException;        void setSerialFormat(int i);         int getSerialFormat(); createLeaseMap(long l);        boolean canBatch( lease);}
In java, if I do LeaseContext.FOREVER that works, in Scala I am forced to do Lease.FOREVER. Why is there such a difference?
Best Regards and Merry Christmas

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland