Hi,
iam Ganapathi .,
can any one explain me where i have don mistake in this code........,
class I {
StringBuffer sb = new StringBuffer("T he boy is going ");
String ind() {
for ( int i=0 ;i<sb.length() ; i++) {
System.out.prin tln("index of " + i + " " + sb.charAt(i));
}
return sb.charAt(i);
}
}
class TheBoy {
public static void main(String []args) {
I s1 = new I();
String v = s1.ind();
System.out.prin tln(v);
}
}
iam Ganapathi .,
can any one explain me where i have don mistake in this code........,
class I {
StringBuffer sb = new StringBuffer("T he boy is going ");
String ind() {
for ( int i=0 ;i<sb.length() ; i++) {
System.out.prin tln("index of " + i + " " + sb.charAt(i));
}
return sb.charAt(i);
}
}
class TheBoy {
public static void main(String []args) {
I s1 = new I();
String v = s1.ind();
System.out.prin tln(v);
}
}
Comment