About Question enthuware.ocpjp.v11.2.3411 :

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

Moderator: admin

Post Reply
alfredo.zuloaga
Posts: 10
Joined: Fri Nov 18, 2016 5:48 pm
Contact:

About Question enthuware.ocpjp.v11.2.3411 :

Post by alfredo.zuloaga »

If the guideline said Guideline 5-1 / INPUT-1: Validate inputs

what is the purpose of
private boolean validate(BalanceSheeData bsd){ //check validity and return true false accordingly }

is not validate before of use ?
public void process(BalanceSheeData bsd){
if(validate(bsd)) { doSomething(bsd.clone()); }
}

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

Re: About Question enthuware.ocpjp.v11.2.3411 :

Post by admin »

Sorry, I did not understand your question.
The correct option (option 1) is talking about cloning the object before validation. So, you clone the input object, and use that clone for validation and further use.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 56 guests