About Question enthuware.ocajp.i.v8.2.1075 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
ANTRENT
Posts: 1
Joined: Fri Dec 16, 2016 9:06 am
Contact:

About Question enthuware.ocajp.i.v8.2.1075 :

Post by ANTRENT »

Hi I do not understand the answer to this question since it indicates that the correct answer is "void k () {i ++;} // (3)" and by its definition "Default constructor (having no arguments) is automatically created only if the class Does not define any constructors. So as soon as // 2 is inserted the default constructor will not be created. " This is not a problem, please help me.

Thank you

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v8.2.1075 :

Post by admin »

void k(){ i++; } is not a constructor. It is just a method. If you insert it in the class, there is no impact on constructors.

HTH,
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests