In the answer there is nothing said about the instance variables the class contains.
I understand now that with declaration you only want the access-level, class-name, extends and/or implements?
I answered:
public class Polygon extends Shape {private List<Points>; private Color color; private boolean fillvalue;}
About Question com.enthuware.ets.scjp.v6.2.387 :
Moderator: admin
-
- Posts: 50
- Joined: Sun Nov 10, 2013 4:39 am
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question com.enthuware.ets.scjp.v6.2.387 :
Yes, that is what is meant by declaration. What you have is definition.
HTH,
Paul.
HTH,
Paul.
-
- Posts: 27
- Joined: Mon Sep 22, 2014 1:30 pm
- Contact:
Re: About Question com.enthuware.ets.scjp.v6.2.387 :
This is very confusing. I don't have practical experience in java but, looking at the docs:
I don't think Oracle implies any distinction between class declaration and class definition here:
http://docs.oracle.com/javase/tutorial/ ... sdecl.html (see: first example)
And here it even says that declaration also "associates attributes with the declared identifier":
http://docs.oracle.com/javase/tutorial/ ... ssary.html (see: declaration, definition)
I don't think Oracle implies any distinction between class declaration and class definition here:
http://docs.oracle.com/javase/tutorial/ ... sdecl.html (see: first example)
And here it even says that declaration also "associates attributes with the declared identifier":
http://docs.oracle.com/javase/tutorial/ ... ssary.html (see: declaration, definition)
Who is online
Users browsing this forum: No registered users and 8 guests