为什么我的断言语句没有产生任何结果?我认为第一个断言语句应该失败,但我没有看到 Eclipse 上显示任何内容。
我正在使用 Eclipse 来运行这个程序。
package java.first;
public class test {
  public static void main(String[] args) throws Exception {
    String s = "test1";
    assert (s == "test");
    s = "test";
    assert (s == "test");
  }
}