Challenges are what make life interesting
Overcoming them is what makes life meaningful I am enjoying Challenges
Pages
(Move to ...)
Home
empty field validation in android
Contact Us
Tomcat Server not starting with in 45 seconds
Visit More Sites
All
All Page Links
▼
Monday, 16 December 2013
count occurrences of character in string in java
String s = "...";
int counter = 0;
for( int i=0; i<s.length(); i++ )
{
if( s.charAt(i) == '@' )
{
counter++;
}
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment