public class AbstractTest{
public static void main(String[] ignored) {
Abstract test=new Abstract("a","b"){
} ;
test.getInstance();
}
}
abstract class Abstract {
private String a;
private String b;
Abstract(String a, String b) {
this.a = a;
this.b = b;
}
Abstract getInstance() {
return this;
}
String getString() {
return "this is testing in java";
}
}
No comments:
Post a Comment