ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What are the limitations for static method?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What are the limitations for static method?
Answer
# 1
cdan not be reffered to this or super
can only access static data
can only call other static methods
 
Is This Answer Correct ?    4 Yes 1 No
Niranjanravi
 
  Re: What are the limitations for static method?
Answer
# 2
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 ?    0 Yes 0 No
Vijayakumar Chinnasamy
 
 
 
  Re: What are the limitations for static method?
Answer
# 3
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 ?    0 Yes 0 No
Puneet
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Program to find greatest prime number in n numbers? Huawei3
how to use this key word in java programming?  5
what is aberivation of java?  10
explain about casting of objects?  4
what is web.xml?and its use? CTS6
When does the compiler supply a default constructor for a class? TCS8
what is Dictionary? and what purpose it is used for?  2
can u override the start() method of Thread class  4
Iterator in the HashMap is fail-safe means what? IBM9
How to access a method that it declared as protected?  3
Hi friends, i am new to java. can you explain how java is secured.  1
whats string ? HCL8
what is the use of private constructor in core java? Satyam3
Difference between a Scrollbar and a ScrollPane?  1
what is mutability?which one is mutable String or StringBuffer?and why?give examples of each which shows the mutability of each String or StringBuffer  2
Difference between canvas class & graphics class?  1
how can you retrive information from database by using hashmap/arraylist ,plz explain with example briefly? Satyam1
How to sort a vector elements that contains the user define class object? (Note: If Suppose consider, A Student class contain two data members. They are String studentName and int rollNo. I am creating Four objects for this class, each object contains students details like name and roll no. Now i am storing that objects in vector and if i retiving the elements from the vector means then it should be display in sorting order) ProdEx-Technologies2
What is the return type of readLine() when end of a file is reached?  1
How can you reverse a string?  4
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com