Non repeating character in Java
Your algorithm is correct. There is no way to reduce time or space complexity, so I will give some less important suggestions.


because you know that there will only be latin letters, we can use an array instead of a hashtable and avoid the overhead. You can decide for yourself if this approach is explicit enough.

int[] counts = new int[26];
counts[ch - 'a'] += 1

firstNonRepNum() has an argument size, that it does not use.
Your indentation, while mostly consistent, is very odd. It ends up with 8 chars of indent each level. Read some style guides for other ways of indenting. In java most people indent like this.

public void func(int[] arg) {
    for (int i; arg) {
        if (i % 2) {
            even();
        } else {
            odd();
        }
    }
}

if a variable is only used in a certain scope, declare it in that scope. This helps people who are reading your code because they dont have to search for what count does.

{
    int occurs = count.get(ch);
    count.put(ch, occurs+1);
}

You call firstNonRepNum() twice. Once to check if there is a solution and once to get the result. Call it once and put the result in a variable.
Remove any unused variable declarations (i.e. String line2) or commented out code as soon as you are sure you don't need it.