Is there any built-in method in Java to find the size of any datatype? Is there any way to find size?
I don't think it is in the java API. but most datatypes which have a number of elements in it, have a size() method. I think you can easily write a function to check for size yourself?
size()