java - Why run method defined with abstract keyword in runnable interface -


This question may be silly, but I'm mistakenly checking in the Java source code that runs the runner interface , But according to the interface definition, all the methods are in the default by one interface. Then again I am confused why the runnable interface is the abstract keyword for the run method. I check with other interfaces like map, list, etc. but there is no abstract keyword.

Please give me an idea why this is written in the Java source code.

  the public summary runs zero (); 

< P> The 'public' announcement is also redundant, since all symbols are made public by default in one interface.

Perhaps this is written out of habit. I think that runner was between the first interconnected interface in ZK 1.0, and at that time, the announcement of the error for the interface was not completely put in the mind of JDK developers. I remember reading in an interview with James Gosling, in Oak, which was the name of the project to become Java, once there were no interfaces, there were just abstract classes like C ++, and this could be a hangover from it is.

I sometimes say "public" for interface methods and constants, although this is not necessary.


Comments