Please explain me this matter.
Thanks.
Why "color= new Color();" not " Color color=new Color(); "
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Nouser
27 September 2020, 06:37
Cause the instance variable (field) color has already been declared. So it just needs to get a value inside the constructor.
Declaratioin in line 9:
+2