Hi everybody ,
i got a problem with my Program.
this is the Programm:
Code:
public class check
{
public static void main(String[] args)
{
String text = "Loooppa";
int oCount = 0;
int index = -1;
int i=0;
String oStr="o";
int textLength = text.length();
index = text.indexOf(oStr);
while(index>=0)
{
index = index + oStr.length();
index = text.indexOf(oStr,index);
oCount++;
}
System.out.println(+oCount +oStr);
}
}
After i run the program i become:
-Now my question is how can i become this output:
thx in advance
[ArchAngel added CODE and QUOTE tags]
Bookmarks