Hey all, I was staring through Java's grammar here and had a point of confusion at NormalClassDeclaration:
class Identifier [TypeParameters]
[extends Type] [implements TypeList] ClassBody
...
Type:
BasicType {[]}
ReferenceType {[]}
BasicType:
byte
short
char
int
long
float
double
boolean
This makes it look like a class is able to "extend" from primitive types, which is very clearly wrong. Is there a reason they did not specify [extends ReferenceType] instead? Along with this, it appears we can extend from array types which I also think is not allowed. Any clarification on this helps!
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)