String builder (Basic code error)

same code of string builder as taught in video is not working on eclipse and showing error i have saved the code in ide it is working on that but not in eclipse

Exception in thread “main” java.lang.Error: Unresolved compilation problems:
The constructor StringBuilder(String) is undefined
The method length() is undefined for the type StringBuilder
The method append(String) is undefined for the type StringBuilder

@deepanshu_123 The code which has been saved on ide, send that code here, than only I can resolve the error. Send the link of the code.

@deepanshu_123 hi make the class name something else, you cannot use Java keywords as it is in custom classes.

1 Like

thank u so much it worked

@deepanshu_123 Cool!