Hi all !
I got confused with set and get attributes in HttpSession interface. Please see the below attached program:
Here its working fine but if i change date to date1 in getAttribute its showing error but if i write as
Date date=new Date(); then if i change date to date1 in getAttribute its not showing error . Why so ?
Do you mean if you change line 34 from date = new Date(); to Date date = new Date();? You're then trying to declare a new variable with the same name as an existing variable (the one you declare on line 29).