About Question enthuware.ocajp.i.v7.2.1076 :

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

Moderator: admin

Post Reply
kashyapa
Posts: 23
Joined: Thu May 08, 2014 5:27 am
Contact:

About Question enthuware.ocajp.i.v7.2.1076 :

Post by kashyapa »

Doesn't matter that the array is local or not, and instance or static, all types of arrays are get initialized to its default values ?
Last edited by admin on Wed Jul 09, 2014 10:04 am, edited 1 time in total.
Reason: No need to put multiple question marks.

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

Re: About Question enthuware.ocajp.i.v7.2.1076 :

Post by admin »

Yes, if you create an array object, then all its elements are initialized appropriately as given in the explanation.

MUNISH JASWAL
Posts: 2
Joined: Tue Apr 05, 2016 7:14 am
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1076 :

Post by MUNISH JASWAL »

Shouldn't there be "i++" INSTEAD OF "++i" in for loop?

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

Re: About Question enthuware.ocajp.i.v7.2.1076 :

Post by admin »

Why do you think so?

Sergey
Posts: 39
Joined: Sat Jul 29, 2017 1:04 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1076 :

Post by Sergey »

eh... i thought (until that moment) the iterations should be like this, because of ++i.

Code: Select all

1
2
3
4
5
6
7
8
9
10
But no, the first iteration however starts from 0. I must remember it.

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests