What happens when a class is made static like if a field or
member is made static it becomes class variable and is
shared by all the object of the class?



What happens when a class is made static like if a field or member is made static it becomes class ..

Answer / arvind verma

If a class is made static then we can access it's methods &
variables by using class name , no need to create class
object

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is xslt in java?

0 Answers  


Can java inner class be static?

0 Answers  


What is the difference between a Window and a Frame?

6 Answers   Infosys, ProKarma,


byte a=5; byte b=5; byte c=a+b; System.out.println(c); whats the o/p?

7 Answers   NIIT, Wipro,


How to make a read-only class in java?

0 Answers  


Write a java program to get a string of words and print the numbers of each word count in descending order

11 Answers   Logica CMG, Subex,


How does compareto method work?

0 Answers  


Give me some null interfaces in java?

0 Answers  


How many ways can an argument be passed to a subroutine and explain them?

0 Answers  


What do you mean Abstraction in java?

0 Answers   Aspire, Infogain,


solve (x-1)(x-9)=8;

3 Answers   IBM, Manhattan, TCS,


when everything can be done by static block then why do we use main method?.

2 Answers  


Categories