Java Interview Question And Answer Static Field in Java Explain Java Interview Question

Опубликовано: 22 Ноябрь 2013
на канале: Interview DOT
13,126
13

Click here -    / @interviewdot   to get notifications. Java Interview Question And Answer Static Field in Java Explain Java Interview Question

What does it mean that a method or field is "static" ? Java Interview Question and Answer ?

1.Static variables and methods are instantiated only once per class.
2.In other words they are class variables, not instance variables.
3.If you change the value of a static variable in a particular object, the value of that variable changes for all instances of that class.
4.Static methods can be referenced with the name of the class rather than the name of a particular object of the class (though that works too).
That's how library methods like System.out.println() work. out is a static field in the java.lang.System class.

A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-re...

Other Top Job Portals
www.Naukri.com
www.MonsterIndia.com
www.TimesJobs.com

Are you looking for a new Job ?
InterviewDot.com - A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-re...


На этой странице сайта вы можете посмотреть видео онлайн Java Interview Question And Answer Static Field in Java Explain Java Interview Question длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Interview DOT 22 Ноябрь 2013, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 13,126 раз и оно понравилось 13 зрителям. Приятного просмотра!