Hi,
I learned concept of StringBuilder but when I am trying this in my computer I found some errors which I post here in particular line commented.
public class StringBuilder {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
StringBuilder sb = new StringBuilder(); // creates empty builder, capacity 16
sb.append("Greetings"); // The method append(String) is undefined for the type StringBuilder(adds 9 character string at beginning)
int l = sb.length(); //The method length() is undefined for the type StringBuilder
System.out.print("length is "+l);
}
}
I tried with java 1.5 and java 1.6 aswell.
Pl tell anybody if know what is problem.
thanks,
Shobhit