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...

How can we find size of the object ?

Answer Posted / m!r@

public class FindSizeOfObject{
public static void main(String[] args) throws Exception{

Runtime obj = Runtime.getRuntime();
System.out.println(obj.totalMemory() - obj.freeMemory());
}
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What type of language is java?

934


What is singleton service?

907


Explain about serializable interface in java?

933


Can arraylist hold different types java?

921


What is quick sort in java?

939


What is difference between fail-fast and fail-safe?

1174


Why is stringbuffer faster than string?

867


What is an array in java?

1123


What is anagram of a string?

884


Can constructor be inherited?

976


What is the difference between hashmap and hashtable in java?

1041


Can I learn java in 3 months?

957


What are the differences between throw and throws?

1028


How to change the priority of thread or how to set priority of thread?

979


Write a function to find out longest palindrome in a given string?

1002