Core Java Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 239 Page Views: 

What is the difference between static and non-static variables?



Posted By: Avi Date: 3 November 2010 03:32:53 AM
 Answer:

A static variable is associated with the class as a whole rather than with specific instances of a class. Non-static variables take on unique values with each object instance


Posted By: avibtech


Date: 3 November 2010 03:32:53 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image iSFq7X
Related Questions
Core Java : What is the ObjectInputStream?

What is the ObjectInputStream?

It is a class allows you to read objects directly from a stream
Category: Core Java Date: 11/4/2010 3:43:49 PM
Core Java : How to force garbage collector to run?

How to force garbage collector to run?

By using System.gc().
Category: Core Java Date: 11/4/2010 3:10:47 PM
Core Java : Which class is extended by all other classes?

Which class is extended by all other classes?

The Object class is extended by all other classes.
Category: Core Java Date: 11/4/2010 2:58:53 PM
Core Java : Why java does not support multiple inheritance?

Why java does not support multiple inheritance?

Because the multiple inheritance causes the redundancy and diamond problem can’t be solved.
Category: Core Java Date: 11/4/2010 2:26:51 PM
Core Java : What are the high-level thread states?

What are the high-level thread states?

The high-level thread states are ready, running, waiting, and dead
Category: Core Java Date: 11/4/2010 1:21:50 PM