What kind of variables a class can consist of?



What kind of variables a class can consist of?..

Answer / Rajat Prakash Singh

A class in Java can contain instance (non-static) variables and static variables. Instance variables are specific to each object instance, while static variables belong to the class itself.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is a static class in java?

1 Answers  


What is null in java?

1 Answers  


Can we synchronize static methods in java?

1 Answers  


What is the multi-catch block in java?

1 Answers  


diff. b/w JAVA and javascript...

3 Answers   NIIT,


Explain yield() method in thread class ?

1 Answers  


why the wait,notify,notifyall methods are placed in object class?these are the thread concepts why these methods are placed in Object class?

2 Answers   Global Logic, Satyam,


Can string be considered as a keyword?

1 Answers  


What is immutability in java?

1 Answers  


Can a private method of a superclass be declared within a subclass?

1 Answers  


Which package is used for pattern matching with regular expressions?

1 Answers  


Give reasons supporting that string is immutable.

1 Answers  


Categories