everyone, I'm newbie. My purpose is to get the byte[] buf variable from ByteArrayInputStream by extends it, in this http://www.java2s.com/Open-Source/Android/android-core/platform-libcore/java/io/ByteArrayInputStream.java.htm tells that ByteArrayInputStream has no no-args constructor, but when I code:
class Test extends ByteArrayInputStream {
public Test(int i){}
}
eclipse tells me: Implicit super constructor ByteArrayInputStream() is undefined. Must explicitly invoke another constructor. Before ask this I searched google then got these: Java error: Implicit super constructor is undefined for default constructor , it tells that if class B extends class A, then class A has to define a no-args constructor. OK, this easy for the classes we wrote, but what about classes from Sun's package... I wonder about this too
Thanks in advance.