I have an interface that declares set()
method.
One implementing class operates on byte[]
arrays, therefore it will implement set(byte[] arr)
Another class operates on int[]
arrays, therefore it will implement set(int [] arr)
.
Since int
& byte
are primitive types, I'm 开发者_开发技巧not sure how to write the interface declaration!
Any ideas? Thanks.
interface Name<T> {
void set(T object);
}
精彩评论