JLS explanation or correction needed 7.5.3 & 7.5.4
Hiram Hunt
hiramhunt at verizon.net
Sun Jun 12 23:02:37 UTC 2016
The JLS (Java 8 SE Edition) says in section 7.5.3
"It is permissible for one single-static-import
declaration to import several fields or types
with the same name, or several methods with the
same name and signature."
and says in section 7.5.4
"It is permissible for one static-import-on-demand
declaration to import several fields or types
with the same name, or several methods with the
same name and signature."
My understanding is that it is not legal to declare
several fields with the same name as members of one
class nor several types with the same name as members
of one class nor several methods with the same name
_and signature_ as members of the same class. Thus,
it is hard for me to understand the above quoted
statements from the JLS. They need correction or
explanation, possibly by example.
-- Hiram Hunt (hiramhunt at verizon.net)
More information about the jls-jvms-spec-comments
mailing list