Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

String - finding first non-repeatable character ? need to consider performa

843789Oct 10 2009 — edited Oct 11 2009
Dear all,

I want find first non-repeatable character in string, for exaple
String s = ?Dayananda?; 
For the above string ?s? is first non-repeatable character.
I can use char array and loops to find out first non-repeatable character.
but I need to consider performance.

I am trying do it through regexp.

i tried using some of the methods of String class like indexof but i feel performance issue.

Just give me any idea.

Thanks
Dayananda b v
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 8 2009
Added on Oct 10 2009
12 comments
615 views