خرید بک لینک

Vote count: 0

I need to have a bunch of classes with initialize static method instead of static {...} block where some initialization tasks are run. In Java 8 it is possible to define static interface method but I don't need it to have a body, I just need to know the class implements this static method.

interface Initializable {
    static void initialize(){}
}

class Icons implements Initializable {
    static void Initialize(){
        //...
    }

    //...
}

What's wrong with the idea of using static interface methods in this case and why it is not possible to define interface static method without a body?

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 5 خرداد 1395 ساعت: 15:25

صفحه بندی