public class StringBuilder {
public static void main(String[] args) {
StringBuilder sb = new StringBuilder();
for(char ch='a'; ch<='z'; ch++){
sb.append(ch);
}
System.out.println(sb);
}
}
Asked
Active
Viewed 115 times
0

Olivier
- 13,283
- 1
- 8
- 24

Shivam Singh
- 9
- 2
-
3Why are you calling your custom class `StringBuilder`, which collides with a core Java class of the same name? Your code should be working, other than this potential problem. – Tim Biegeleisen Aug 21 '22 at 07:14
-
What does "not working" mean exactly? – tgdavies Aug 21 '22 at 07:16
-
It says " method append(char) is undefined for the type StingBuilder" – Shivam Singh Aug 21 '22 at 07:48