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

Pubblicato il: 22 novembre 2013
sul canale di: 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...


In questa pagina del sito puoi guardare il video online Java Interview Question And Answer Static Field in Java Explain Java Interview Question della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Interview DOT 22 novembre 2013, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 13,126 volte e gli è piaciuto 13 spettatori. Buona visione!