Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
506 B
2
Indexable
Never
public class Przeciazanie {
    public static void main(String[] args) {
        System.out.println(new A(0xF).fun());
    }
}


class A{
    double value;
    public A(int value){
        this( (byte)(value >> 4 == 0 ? value-2f : value+1.5));
    }

    public A(double value) {
        System.out.println("double method");
    }

    public Object fun(){
        return new Object[]{ new Object(), this}[1];
    }

    public String toString(){
        return value+"2";
    }
}