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

When object is created and destroyed?

1145


How to provide security in java

2330


How to invoke external process in java.

1135


What is mean by collections in java?

1262


When arithmeticexception is thrown?

1079


What are the five major types of reference sources?

1204


What is the difference between static method and instance method in Java?

1291


Explain the purpose of garbage collection in Java?

1083


How would you convert bytes to string?

1054


What are the differences between c++ and java?

1194


Can a class extend more than one class?

1169


Is finalize() similar to a destructor?

1079


Is array passed by reference in java?

1078


Similarity and difference between static block and static method ?

979


What is the multi-catch block in java?

1106