Page 1 of 1

About Question com.enthuware.ets.scjp.v6.2.387 :

Posted: Mon Dec 02, 2013 1:59 pm
by devlam
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;}

Re: About Question com.enthuware.ets.scjp.v6.2.387 :

Posted: Mon Dec 02, 2013 8:25 pm
by admin
Yes, that is what is meant by declaration. What you have is definition.

HTH,
Paul.

Re: About Question com.enthuware.ets.scjp.v6.2.387 :

Posted: Tue Oct 14, 2014 7:07 am
by piotrkmiotczyk
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)