···
import org.junit.jupiter.api.Test;
import java.util.Random;
public class studyString {
@Test
public void StringEqualsTest(){
String s1="aaa";
String s2="aaa";
System.out.println(s1==s2);
}
//使用String builder
@Test
public void UsingStringBuilder(){
Random random=new Random(47);
StringBuilder sb=new StringBuilder("[");
for (int i =0; i <25; i++) {
sb.append(random.nextInt(10));
sb.append(", ");
}
sb.delete(sb.length()-2,sb.length());
sb.append("]");
System.out.println(sb.toString());
System.out.println(sb.reverse());
}
}
```