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

Can a class with private constructor be extended?

1001


What the difference is between execute, execute Query, execute Update?

886


What are the advantages of defining packages in java?

1036


How to implement a multithreaded applet?

2730


What is module in oop?

1076


Which is better stringbuffer or stringbuilder?

968


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

1135


There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?

1545


Can a set contain duplicates?

1002


Why is string buffer better than string ?

1197


What is the basic of java?

1066


What is a classloader in java?

1064


Can you access non static variable in static context?

1099


Is char * a string?

1048


What is meant by 'Class access modifiers'?

1092