Find out the difference between and output of below Java codes?

Example 1:

public Test
{
    public static void main(String[] args)
    {
        int a=20, b=10;
        
        while(b < a)
        {
            System.out.println("Hello");
        }
        System.out.println("Hi");
    }
}

Output: infinite times Hello

Example 2:

public Test
{
    public static void main(String[] args)
    {
        final int a=20, b=10;

        while(b<a)
        {
            System.out.println("Hello");
        }
        System.out.println("Hi");
    }
}

Output: unreachable code