what restrictions are placed on method overriding job interview question

188 views · Published 20 November 2012 · 2:23 · Indexed 9 October 2026

Channel: Interview DOT · 2012 · Science & Technology

Watch on YouTube

Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications. You can submit your resume for right Job

http://www.interviewdot.com/upload-resume/uploadresume.htm
http://www.interviewdot.com http://www.interviewdot.com http://www.interviewdot.com

Welcome to www.InterviewDot.com
What happens to a static variable that is defined within a method of a class ?
Job Java Interview Questions 


What happens to a static variable that is defined within a method of a class ?

No ,we can't  define a static variable within a method. You'll get a compilation error.




How many static initializers can you have in  a class ?

As many as you want, but the static initializers and class variable initializers are executed in textual order and may not refer to class variables declared in the class whose declarations appear textually after the use, even though these class variables are in scope.


You can submit your resume for right Job

http://www.interviewdot.com/upload-resume/uploadresume.htm
http://www.interviewdot.com http://www.interviewdot.com http://www.interviewdot.com

More from this channel