日期:2014-05-20 浏览次数:20796 次
public class Practice
{
public void show(String string) {
System.out.println(string);
}
public void show(int age) {
System.out.println("age :"+age);
}
public static void main(String[] args) {
Practice practice = new Homework();
practice.show(12345);
practice.show("shit");
practice.show('j');
}
}
class Homework extends Practice
{
public void show(char ch) {
System.out.println("character is :" + ch);
}
@Override
public void show(String string) {
System.out.println("string is : "+string);
}
}
public class Practice
{
public void show(String string)
{
System.out.println(string);
}
public void show(char age) //注意这里
{
System.out.println("age :" + age);
}
public static void main(String[] args)
{
Practice practice = new Homework();
practice.show(12345);
practice.show("shit");
practice.show('j');
}
}
class Homework extends Practice
{
public void show(int ch) //注意这里
{
System.out.println("character is :" + ch);
}
@Override
public void show(String string)
{
System.out.println("string is : " + string);
}
}