خرید بک لینک

Vote count: 0

I have a code and I am not able to get why the output will be "Radial Tire with long".Can somebody help me to understand this code?

class Tyre {
    public void front() throws RuntimeException {
        System.out.println("Tire");
    }

    public void front(long a) {
        System.out.println("Radial Tire with long");
    }
}

class TestSolution extends Tyre {
    public void front() {
        System.out.println("Radial Tire");
    }
    public void front(int a) throws RuntimeException {
        System.out.println("Radial Tire with int");
    }


public static void main(String... args) {
        Tyre t = new TestSolution();
        int a = 10;
        t.front(a);

}

}

asked 22 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 17 تير 1395 ساعت: 18:17

صفحه بندی