Drag and Drop(拖曳題
)
Add methods to the Beta class to make it compile correctly.
Methods
class Alpha{
public void bar(int... x){}
public void bar(int x){}
}
public class Beta extends Alpha{
Place here
Place here
Place here
}
private void bar(int x){}
public void bar(int x){}
public int bar(String x){return 1;}
public Alpha bar(int x){}
public void bar(int x, int y){}
public int bar(int x){return x;}
答案:
class Alpha{
public void bar(int... x){}
public void bar(int x){}
}
public class Beta extends Alpha{
public void bar(int x){}
public int bar(String x){return 1;}
public void bar(int x, int y){}
}
class test12{
class Alpha{
public void bar(int... x){}
public void bar(int x){}
}
public class Beta extends Alpha{
public void bar(int x){}
public int bar(String x){return 1;}
public void bar(int x, int y){}
}
}
ANS:
public void bar(int x){}
public int bar(String x){return 1;}
public void bar(int x, int y){}
沒有留言:
張貼留言