|
absolute great stuff. now i have further played with the program and have found few more question. that would be really kind of you if you plz explain me the following questions:-
1)if i write garage=garage instead of this.garage=garage, the code still works but total i.e. current number goes into negative. is there any logic behind it or i m making another mistake in my program?
2)why do we need following code:-
public static void main(String[] args)..if i replace this with
public GarageTest()...code still works perfectly fine.
3)sometimes in method we write void and sometimes don't, what does void really means?
4)why do we really need currentNumber, why can't we directly use if(Total==50) instead of if(currentNumber==50).
Thanks a lot for your help. really appreciate.
Kind Regards,
elecrobot
Last edited by elecrobot : 11-26-2007 at 11:59 PM.
|