What is static variable and static method?

Answer Posted / sivaramakrishna bandaru

static method or a variable is not attached to a particular
object, but rather to the class as a whole. They are
allocated when the class is loaded. Remember, each time you
call the instance the new value of the variable is provided
to you.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how is final different from finally and finalize in java?

689


What are predicates in java 8?

655


State one difference between a template class and class template.

715


Can we have any code between try and catch blocks?

643


What is dynamic array in java?

616






What are the four corner stones of oop?

649


What is lossy conversion in java?

678


How many bytes is string in java?

731


What is the need of transient variables in Java ?

681


What is the reason behind using constructors and destructors?

662


When should you make a function static?

625


What is the Difference between Final Class && Abstract Class?

711


What is meant by interface?

638


Are arrays passed by reference in java?

582


What is append in java?

733