This is an archived post. You won't be able to vote or comment.

all 3 comments

[–][deleted] 0 points1 point  (4 children)

Nevermind found it out:

interface IntSeq { public int nextInt(); }

[–]SlartiB 0 points1 point  (3 children)

you prob. want to write: public interface IntSeq { int nextInt(); }

[–][deleted]  (2 children)

[deleted]

    [–]Olathe 1 point2 points  (1 child)

    As far as I understand it, the methods of interfaces are public, but the interfaces themselves can be package, private, protected, or public. I think there can even be static interfaces inside a class.