This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
a question about naming interfaces: I personally prefer to name interfaces with a "I" as first letter, e.g. IService, IDatabaseAccess, ... so you can see by its name that something is an interface.
Sun coding conventions seem neither to forbid nor to encourage that either saying only "Interface names should be capitalized like class names.", but their examples do not have an "I" (RasterDelegate, Storing).
How do you think about this?
P.S.: I tried to search the forum for similar topics, but the search mechanisms seem not to be capable for this kind of search.
Hey, partner. I thought a lot about this, but I decided not to put an I in front of interfaces' names, because the interfaces that come with the Java language do not have it. For instance, there's no IActionListener, IRequestDispatcher or IHttpSession. But I think that if you decide to do so, it shouldn't be a problem.
Having an "I" in front of interfaces may be nice but as Rob said the API doesn't follow that. For the assignment Sun's provided interface is called DBMain for me anyway. So for interfaces, I start mine as DBxxxx such as DBRemote for my remote interface.