Answer:
Static variable is used for class level variables.
Example: you have a website and you want to count online users.
Take a variable static in login page and increament it when successfully login. it will be updated for all users not specific.
Asked In: Many Interviews |
Alert Moderator