About Question enthuware.jwpv6.2.1097 :

Moderator: admin

Post Reply
shareef.hiasat
Posts: 20
Joined: Thu Dec 19, 2013 8:22 am
Contact:

About Question enthuware.jwpv6.2.1097 :

Post by shareef.hiasat »

Code: Select all

int sum = 0; //this shadows the instance variable, but it is not illegal.
doesnt the above code give compiler error because of overlapped variables ?!

thanks admin

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

Re: About Question enthuware.jwpv6.2.1097 :

Post by admin »

No, that is how the language designers designed it. Shadowed/hidden fields are legal to have.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 140 guests