Looking at the code of the abstract class ByteBuffer , it inherits it from the base class Buffer .
ByteBuffer has one constructor:
ByteBuffer(int capacity) { super(capacity); }
And Buffer has one constructor:
Buffer(int mark, int pos, int lim, int cap) { ... }
So, my question is: when ByteBuffer calls its parent constructor, how it works, because the parameters are not the same?
UPDATE. This is not a question, but it is worth knowing that some online Java source repositories (docjar in this case) contain the mish-mash of the Java source. Best Download JDK **
source share