EXPLAIN TESTCASE 0

import java.util.Scanner;

public class FREQUENCY {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int i,j,l,sum=0,temp=0;
String str=input.nextLine();
char c;

StringBuffer sb= new StringBuffer(str);
l=sb.length();
char che=sb.charAt(1);
for(i=0;i<l;i++) {
	for(j=i;j<l;j++) {
		c=sb.charAt(i);
		if(c==sb.charAt(j)) {
			sum=sum+1;
			if(sum>temp) {
				temp=sum;
				che=c;
			}
		}
		
	}
	sum=0;
	
}
System.out.print(che);
}

}

PLEASE MAKE CORRECTION

@KUNAL.SHARMA5724510,

Sample input: abc
your output: a
Correct output: c

Better approach:
1.Declare an Array of 26 size to store the Freq of each character.

2.Each time any character is encountered increment its corresponding freq at that index.

3.Declare a max variable and put a loop on filled array.

4.Update the max and character accordingly.

@KUNAL.SHARMA5724510,

Also your code will give a run time error if string length is 1.

Sample input: a
Correct output: b
your output: RunTime error.

@KUNAL.SHARMA5724510,
https://ide.codingblocks.com/s/223964 Corrected code.
I have highlighted the line which was giving you an error.