Q:

Conditions in while loop

Why this code works (Window closes on escape button)? 

It looks that my post is mostly code, i dont know what details to add.  It looks that my post is mostly code, i dont know what details to add.  
public class Main
{
    public static void main (String[] args)
        {
            start(); //Create a window
            render(); //Run the game
            close(); //End the game
        }

    private static void start()
    {
        Window SD = new Window();
        SD.Launch();
    }

    private static void render()
    {
        while(!Display.isCloseRequested() && ! Keyboard.isKeyDown(Keyboard. KEY_ESCAPE))
        {
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)

        Display.update();
        }
    }

    private static void close()
    {
        Display.destroy();
    }
}

But this code does not:
//
while(!Display.isCloseRequested() && ! Input. ESC)
//

public class Input
{
    public static boolean ESC = Keyboard.isKeyDown(Keyboard. KEY_ESCAPE);
}

A:

In your second version, Keyboard.isKeyDown(Keyboard. KEY_ESCAPE) is evaluated once and its value is assigned to ESC, which remains constant.  It's either always true or always false (more likely). 
Your first version evaluates ! Keyboard.isKeyDown(Keyboard. KEY_ESCAPE) on each iteration of the loop, so it can detect when ESC is actually pressed. 
If you change ESC to be a static method instead of a static variable, your expression will be evaluate in each call to ESC() and both loops would work. 
while(!Display.isCloseRequested() && ! Input. ESC())
//

public class Input
{
    public static boolean ESC() 
    {
        return Keyboard.isKeyDown(Keyboard. KEY_ESCAPE);
    }
}

