find firs reoccuring char in a string w/o using array and not picking a letter manually[JAVA] : i've looked through the posts but couldn't find the exact answer. This is the code i have. it only returns a value when i set s.CharAt(0) and then h will equl h. Bu t i wan't it to run automatically and w/o arrays. thank you

		          String s = "hellohe";
		          int d = s.length();
		
			       for (int i =0; i<d;i++)//{
			       char result=s.charAt(0);
			       if (result==s.charAt(i)){
			     	System.out.println(result);
			       }
			
		