开发中遇到的杂七杂八

Java 的默认字节顺序是大端字节顺序
 

如果修改了静态资源,只需要按 Ctrl + R 刷新浏览器页面即可重新加载资源。 

SecureCRT软件设置查看被覆盖的信息:
Options => Session Options =>Terminal => Emulation => Scrollback 

//两个整数相加,避免溢出的处理
//例子1
static int addInt(int x, int y) {
     if (x > 0 && y > 0 && x > Integer.MAX_VALUE - y)
          return Integer.MAX_VALUE;
     if (x < 0 && y < 0 && x < Integer.MIN_VALUE - y)
          return Integer.MIN_VALUE;
     return x + y;
}
//例子2
static int addInt2(int a, int b) {
     int x = a + b;
     if ((x ^ a) < 0 && (x ^ b) < 0) {
          // overflow, do something
          System.out.println("overflow!");
     }
     return x;
}
 

在JVM DEBUG参数中,有一个参数叫"suspend",它的取值有两个,“y”或者“n”,如果您刚开始就想调试的话,将参数设置为"suspend=y",这样Eclipse会远程连接Java应用程序。
如果你想先运行项目,然后连接Eclipse,那么可以将参数设置为"suspend=n",这样的话,Java应用程序会正常运行,之后Eclipse会开始远程连接。

 
原文地址:https://www.cnblogs.com/xianDan/p/4334484.html