كود
import java.util.*;
public class Main {
static Scanner console= new Scanner(System.in);
public static void main(String[] args)
{
System.out.print("Please Enter aString ");
System.out.println();
String str =console.next();
char[]third =str.toCharArray();
for(int counter =0;counter<third.length;counter++)
{ char letter= third[counter];
int flage=0;
for (int i=0; i<third.length; i++)
{
if (letter==third[i])
flage++;
else continue;
}
}
}
public static void counter (int x)
{
int []count= new int[x];
// this method to store the number of occurrences of each
//alphabetical letter in the string
}
public static void read (int x)
{
// this method should recive acharacter
// then update its the corresponding counter
}
}
public class Main {
static Scanner console= new Scanner(System.in);
public static void main(String[] args)
{
System.out.print("Please Enter aString ");
System.out.println();
String str =console.next();
char[]third =str.toCharArray();
for(int counter =0;counter<third.length;counter++)
{ char letter= third[counter];
int flage=0;
for (int i=0; i<third.length; i++)
{
if (letter==third[i])
flage++;
else continue;
}
}
}
public static void counter (int x)
{
int []count= new int[x];
// this method to store the number of occurrences of each
//alphabetical letter in the string
}
public static void read (int x)
{
// this method should recive acharacter
// then update its the corresponding counter
}
}