Удалить все строки, кроме одной с наибольшим значением

Создайте свой собственный класс System в том же пакете с Condition. В этом случае ваш класс System скроет класс java.lang.System

class Condition
{
    static class System
    {
        static class out
        {
            static void println(String ignored)
            {
                java.lang.System.out.println("Not ok");
            }
        }
    }

    public static void main (String[] args) throws java.lang.Exception
    {
        int x = 0;
        if (x == x) 
        {
           System.out.println("Not ok");
        } 
        else 
        {
           System.out.println("Ok");
        }
    }
}  

Ideone DEMO

-8
задан Mehdi Bounya 28 January 2018 в 20:54
поделиться