public class StringBufferTest {public static void main(String[] args) {StringBuffer sb=new StringBuffer("aynu,aynu");sb.deleteCharAt(4);System.out.println(sb);//第1空sb.delete(4, 8);System.out.println(sb);//第2空}}
public class StringBufferTest {public static void main(String[] args) {StringBuffer sb=new StringBuffer("aynu,aynu");sb.deleteCharAt(4);System.out.println(sb);//第1空sb.delete(4, 8);System.out.println(sb);//第2空}}
StringBuffer sb = new StringBuffer("aynu");sb.insert(1, true);System.out.println(sb); A: trueaynu B: atrueynu C: aynutrue D: 运行不通过
StringBuffer sb = new StringBuffer("aynu");sb.insert(1, true);System.out.println(sb); A: trueaynu B: atrueynu C: aynutrue D: 运行不通过
1