GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  I-Flex  >  Technical
Go To First  |  Previous Question  |  Next Question 
 Technical  |  Question 23 of 27    Print  
What is static ?
how it used?

  
Total Answers and Comments: 2 Last Update: August 20, 2008     Asked by: bhaskar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 27, 2006 00:08:58   #1  
       

RE: What is static ?how it used?

Making a variable or method static means they are class members not instance members. A Static member does not get copied as objects are created rather the are shareed among all objects. Static members are initialized at the time class is loaded.

Static members can accssed by classname itself without any reference to a specific instance.

Methods declared as static have seeveral restrictions: 1)They can only call othr static methods. 2) They must only access static data. 3)They cannot refer to 'this' or 'super' in any way.

You can initialize static members in Static Initialization block.

Static variabls can be used for counting the no. of objects created for a particular class.

main() method is declared static because it is called before we create any instance of the class.


 
Is this answer useful? Yes | No
August 20, 2008 03:28:58   #2  
ankush6012 Member Since: August 2008   Contribution: 2    

RE: What is static ?how it used?
Static key word when applied to method or variable this means that the belong to class not any object you can call them directly.
 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : Static key word when applied to method or variable this means that the belong to class not any object, you can call them directly. ...
Read Answers (2) | Asked by : bhaskar


 Sponsored Links

 
Related Articles

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
 

Data Warehouses Non Technical Issues

Data Warehouses Non Technical Issues When companies get ready to implement a data warehouse few of them pay attention to the political issues that may surround it It must be emphasized that politics can reduce the chances for success with a data warehouse project and I want to warn companies against
 

Static Functions - An Introduction

Static Functions An Introduction The 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 that is a static member of class have only one such data for the entire class even though there are many objects created fo
 

Technical Aspects of CRM

Technical Aspects of CRM While it must be emphasized that CRM is not a technology there are a number of technical issues that need to be considered when a company decides to implement a CRM system The first technical issue that needs to be analyzed is scalability In a nutshell the CRM system must be
 

ASP.NET Technical Practice Test

ASP NET Technical Practice Test This article provides details about ASP NET Technical Online Practice Test which is made available at geekinterview com Questions are generated randomly each time you take the test Online Practice Test is made available to everyone you too can take the test and get yo
 

C# Technical Practice Test

C Technical Practice Test This article provides details about C Online Practice Test which is made available at geekinterview com Questions are generated randomly each time you take the test Online Practice Test is made available to everyone you too can take the test and get your score assessed mosg
 

Technical Terms Used in Testing World

Technical Terms Used in Testing World In this tutorial you will learn about technical terms used in testing world from Audit Acceptance Testng to Validation Verification and Testing mosgoogle Audit An independent examination of a work product or set of work products to assess compliance with specifi
 

Oracle Apps Implementing Key Flex field and Descriptive Flex field

Oracle Apps 11i Tutorials Implementing Key Flex field and Descriptive Flex field This tutorial tells you about implementation and other features provided in the implementation section mosgoogle Implementing Flex fields Key Flexfield The basic steps in defining a key Flexfields are as given below You
 

Oracle Apps Flex fields

Oracle Apps 11i Tutorials Oracle Flex fields This chapter provides you with a conceptual overview of flexfields The chapter covers the following topics The general features of flexfields Flexfields terminology The benefits of flexfields and Descriptive Flexfields Overview of Flexfields mosgoogle Ora
 

Technical Writing: It might just be the foot in the door you need

Technical Writing It might just be the foot in the door you need For new computer science graduates or even tried and true professionals the opportunities in IT seem to be few and far between If you re looking to break into the industry need a foot in the door at a large corporation or are possibly
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape