Write a Java program to find the first non-repeated character in a string, and explain its time complexity.