There are profilers such as JProbe that will tell you this. The only thing I know of in the JDK is to call Runtime.freeMemory() which tells you the amount of free memory in the VM. If you had a particularly large object you could do something like:
long begin = Runtime.getRuntime.freeMemory();
MyObject myObject = new MyObject(); // allocate the object
long result = Runtime.getRuntime.freeMemory() - begin;
This isn't very accurate but might help if you don't have the profiler.