Difference b/w a static variable and an instance variable?, JAVA Programming

Class variables are named as static variables. There is only single occurrence of a class variable per JVM per class loader. When a class is operated the class variables are initialized.

Instance variables are non-static and there is single occurrence of an instance variable in each and every class instance. A static variable is used in the singleton pattern. A static variable is used with a final keyword to define constants.

 

 

62_Untitled.png

 

Posted Date: 7/25/2012 2:14:03 AM | Location : United States







Related Discussions:- Difference b/w a static variable and an instance variable?, Assignment Help, Ask Question on Difference b/w a static variable and an instance variable?, Get Answer, Expert's Help, Difference b/w a static variable and an instance variable? Discussions

Write discussion on Difference b/w a static variable and an instance variable?
Your posts are moderated
Related Questions
How many kinds of errors can be found during a program development? List them. 1. Syntax errors 2. Semantic errors 3. Run-time errors


This module is gives the fundamental functionality of the spring framework. In this module BeanFactory is the heart of any spring-based application. The whole framework was built o

THE FOLLOWING PROGRAM SHOULD BE JAVA IN ECLIPSE Minimal Spanning Tree Decreasing Edge Dismissal Reverse-delete algorithm. Develop an implementation that computes the MST as fol

what are all possible ways in java for user input and output

what is the use of marker interface?

Differentiation the JDK 1.02 event model and the event-delegation model introduced with JDK 1.1?

A JMS client that makes and sends messages.

Need an engineer who has knowledge working on Flex Reporting tool. Who knows how data needs to be taken care of from DB, SharePoint, ERP and then process using logic/intelligence u

This exercise will give you some introductory exposure to network programming with sockets. Your task is to demonstrate a minimal server program and client program that can send on