GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 203 of 921    Print  
What is static variable

  
Total Answers and Comments: 1 Last Update: July 11, 2005   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 11, 2005 07:34:58   #1  
nidhi j        

RE: What is static variable
static variables are class variables. static variables is for all instances of a class. It is not like as other variables as every instance has pwmn copy for variable. static variable is shared among all instances of class
 
Is this answer useful? Yes | No

 Related Questions

A transient variable is a variable that may not be serialized. 
Latest Answer : I think that in this case 3 processes will be started because we are starting individual programs. If we are starting 2 or more tabs in IE then we are starting threads. Notepad is SDI, so it will not have multiple threads.So, I will stick to the processes ...

A (non-local) inner class may be declared as public, protected, private, static, final, orabstract. 
Latest Answer : A non-static member class means inner class is a member of an enclosing class, it can have any accessiblity:public,default,protected, or private. ...

The default value of an String type is null. 
Latest Answer : We use overriding when method avaliable in super class doesnot satisfyour requirement.That is To extend the alreadyavailable feature wew use overloading.If we require the new functionality other than, what we already have we go for Overriding. ...

A non-static inner class may have object instances that are associated with instances ofthe class's outer class. A static inner class does not have any object instances. 
Latest Answer : The static inner classes  can be accessed with out creating it's objects or we can  access  static inner classes with direct class name but in the case of  non-static inner classes access we have to create the object of that class. ...

A private variable may only be accessed within the class in which it is declared. 
Latest Answer : A private variable can also be viewed from an inner class ...
Read Answers (3) | Asked by : Ravi

A static variable is associated with the class as a whole rather than with specific instancesof a class. Non-static variables take on unique values with each object instance. 
Latest Answer : Static variables belongs to class only they have no relation to object. They allocate memory when class is loaded at run time. That's why we can call them by the name of class variables. Non-static variables belongs to object. They allocate ...

A field variable is a variable that is declared as a member of a class. A local variable is avariable that is declared local to a method. 
Latest Answer : Field variables initializes where as local variables are not.class test{   int i;    //i values = 0  [field variable]   string sName; //sName = null  [field variable]   public void display(){     ...

So they can be invoked as if they are a mathematical code library. 
Latest Answer : Static Methods can be directly called.There is no need to create the object of the class.ex    class A       {             staic void display()             ...

The default value of the boolean type is false. 

Latest Answer : static variables are class variables. static variables is for all instances of a class. It is not like as other variables as every instance has pwmn copy for variable. static variable is shared among all instances of class ...


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

C++ Static Functions

C Static Functions Static member functions have a class scope and they do not have access to the this pointer of the class When a member is declared as static a static member of class it has only one data for the entire class even though there are many objects created for the class The main usage of
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

What happens when a variable is not initialized in main function?

When a variable is not initialized in main function it contains garbage value. This can be well seen from the example below main() { int x; printf(“%d”,x); z= sample() } sample() { printf(“Testing program”); } Output is   &n
 

What happens when a variable is not declared in function definition?

Generally in C program the function definition and calling takes the form as given below: main() { int x,y,z; z=sample(x,y); printf(“%d”,z); } sample(x1,y1) int x1,y1; { int z1; z1= x1 - y1; return(z1); } Here what happens is the values x, y gets passed to x1,y1
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

Java Technology Trends

Technology Trends Involving Java Java is an object oriented programming language OOP for Web browsers It is organized around data rather than actions and supports polymorphism which allows the same code to be written generically so it can function with different datatypes inheritance which allows on
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape