Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What are the limitations for static method?

Answers were Sorted based on User's Feedback



What are the limitations for static method?..

Answer / vijayakumar chinnasamy

Static Method:
a. Access only static type data (static type instance
variable).
b. Call only static method ,if non-static then compile
time error.
c.No need the class object to call the static method.
d.Cant use this and super keyword otherwise compile time
error.

Is This Answer Correct ?    50 Yes 4 No

What are the limitations for static method?..

Answer / niranjanravi

cdan not be reffered to this or super
can only access static data
can only call other static methods

Is This Answer Correct ?    26 Yes 4 No

What are the limitations for static method?..

Answer / puneet

Static in context of java is something which is executed at
the time when the class is loaded by either bootstrap loader
or another loader into memory.These are basically for
initializations of the variables which wil be used by all
the instance variables.Say we need ot restrict how many
objects whill be created of the class store the no.of
objects created in a static variable and everytime the
object is called thestatic variable is incremented and as
soon as it reaches a limit restrict it by some logic.

The static methods can be called by the object refrence of
the class or the class name, they cannot use instance
variables or instance methods, they are the part of the
class and not instance, the static variables are stored in
registers and remain in the memory as long as the clas in
unloaded.

Is This Answer Correct ?    10 Yes 10 No

Post New Answer

More Core Java Interview Questions

State differences between C and Java?

0 Answers   Deloitte, JPMorgan Chase,


What are packages and name a few?

4 Answers  


What are the types of casting?

0 Answers  


How to sort list of list in java?

0 Answers  


what is the use of StringBuffer?

2 Answers   Accenture,


Explain about data types?

0 Answers  


String is an immutable object. Then how can the following code be justified. String s1 = ?ABC?; String s1 = s1+?XYZ?; s.o.p(s1); The output is ABCXYZ, which is the value of s1 ?

6 Answers   Flextronics, Keane India Ltd,


Does set allows null in java?

0 Answers  


How are variables stored in memory?

0 Answers  


What are the two major components of JDBC?

5 Answers   CMC, Mind Tree,


What is substring of a string?

1 Answers  


What is string builder?

0 Answers  


Categories