Home » Strings(We Suck Every1) » NonRepeated Char

NonRepeated Char

public class NonRepeatedChar {
 public static void main(String[] args) {
 String str = "rajnikanthamitar";
 int[] count = new int[128];

 char[] charArr = str.toLowerCase().toCharArray();

 for (char c : charArr) {
 System.out.println("char are "+c);

 for (char c : charArr) {
 if (count[c] == 1) {
 System.out.println("First Non repeated character is : " + c);


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


arpit tak

arpit tak

I like JAVA . I code. I chill. I blog.I eat. I sleep. I dream.

Personal Links

View Full Profile →


%d bloggers like this: