the only thing that confuse me is that when i pass the number 10... and when i call the method getFullExpirationDate().. the compiler generates the year exactly
2010...
jhon max wrote:the only thing that confuse me is that when i pass the number 10... and when i call the method getFullExpirationDate().. the compiler generates the year exactly
2010...
Check what you are doing in getExpirationYearInNumber.
oh sorry sir for not clearing the problem... what i mean is.. even if i pass a number 10.. the compiler generates the exact year.... im not reffering to the method
getExpirationYearInNUmber()...
Here, you call getFullExpirationDate(). In getFullExpirationDate(), you call getExpirationYearInNumber(). getExpirationYearInNumber() return a year, which always starts with "20". So even if start with setExpirationDate(10, 01, 24), when you call getFullExpirationDate(), the returned object's year will be 2010, not 10. You should ask yourself why you are using "20" in getExpirationYearInNumber().