find first non repeating character in a string

Java
String given ="grepper";

for(char j :given.toCharArray()){
	if(given.indexOf(j)==given.lastIndexOf(j)){
		System.out.println(j);
		break;
  }
}
Source

Also in Java: