I want to know why it prints 0. On the other hand if I type int l2 = l1*this.width after the declaration of int width, it prints 100 as expected. Please anyone give me a clear cut explanation of the above code. I appreciate your help.
Thanks for the reply. I know that I havn't initialized width before I use it. But I want to know why when said int ll = l * this.width; int width = 10; gives no error and when said int ll = l * width; //gives error here???why??? int width = 10; gives an error? Please clarify this.
Regards, Jothi Shankar Kumar. S
Joined: Feb 02, 2006
int ll = l * width; //gives error here???why??? int width = 10;