I had a discussion with my Computer Science teacher about how much memory a class in JAVA takes up. Neither of us knew a specific answer, but I had a few questions that he couldn't answer.
1) Is it as simple as each classes' amount of bytes that its primitive data types use is what determines its memory usage?
2) If you make an instance of a class and set it to null, would it still take up as many bytes as an instance that is not null?
3) Does a String with 100 characters in it, have the same amount of bytes as a single character string?
4) If a class has no variables, no methods, nothing, and just looks like this:
public class Test{}
would it still take up memory?