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 is the reason behind non static method cannot be
referenced from a static Context?

Answers were Sorted based on User's Feedback



what is the reason behind non static method cannot be referenced from a static Context?..

Answer / srinivaskumar.nimmana

static method or static variable has special memory called context of class. it is allocate before execution. but in case of non-static method memory allocate at the time of executing.
so clearly static method is first loaded at the time of static method loading non-static method is not available to the static method because it is not loaded.
when non-static is loaded at that time static is already loaded.so static method is always available to non-static vice versa not possible

Is This Answer Correct ?    9 Yes 0 No

what is the reason behind non static method cannot be referenced from a static Context?..

Answer / sadikhasan palsaniya

static variable and method refer to the class variable and
method and non static method can refer to particular object
and if static method can permit to access non static method
then how can recognize that method belong which object
that's why not accessible.

if any mistake welcome and correct me!!!!!

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Core Java Interview Questions

What is difference between arraylist and list in java?

0 Answers  


whst is encapsulation?when u encpsulate actually while devoloping code?

7 Answers   Amdocs, MGL,


Is singleton class thread safe?

0 Answers  


Does java support multiple inheritance or not?

0 Answers   Hexaware,


How many types of voids are there?

0 Answers  


Why operator overloading is not in Java?

0 Answers  


Can you call a private data from an inner class?

6 Answers  


How many ways can you break a singleton class in java?

0 Answers  


When you say String is immutable, what do you mean by that? Say I have String s = "Ness" s= s+"Technologies"; What will happen? If the value gets appended, then what is the meaning of immutable here?

5 Answers   Ness Technologies,


Which sorting is best in java?

0 Answers  


What is the method in java?

0 Answers  


What is foreach loop in java?

0 Answers  


Categories