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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does callback work in java?

1005


What is return type in java?

1019


What is data string?

891


Can we have multiple catch block for a try block?

947


Is null or empty java?

939


What is the difference between an object-oriented programming language and object-based programming language?

955


What is encapsulation in java?

1057


Can we cast any other type to boolean type with type casting?

899


What is bytecode in java ?

1133


Explain about static nested classes in java?

1032


Write a program to find maximum and minimum number in array?

948


How do you compare two strings lexicographically?

894


What is matcher in java?

945


What are the escape sequences in java?

984


Is it possible for yielded thread to get chance for its execution again ?

975