-4
클래스에서 익명 메소드를 실행하는 방법.Java Generic on Class
object Form = SomeRandomForm
Form.Save() // anonymously no need to inherit
이 가능 VB에서
Object something = (could be A or B both because object can accept anything.)
something.Save() //doesn't work. To solve this I could use inheritance(abstract class or Interface) but if I want to do it anonymously
같다 : 예를 들어
,
나는
내가 어딘가에서 개체를 받고Class A {
void Save(){
//do something
}
}
Class B {
void Save(){
//do something
}
}
클래스를 가지고 자바에서?