`
meizuishaishai
  • 浏览: 32098 次
社区版块
存档分类
最新评论
文章列表
相信大家在做JDBC 的 PrepareStatement后台开发中,用?号作为占位符时,对于PrepareStatement抛出的错误的真正原因可能是不好查找的,比如今天我就遇到了一个问题: Exception Stack: java.sql.SQLException: 索引中丢失 IN 或 OUT 参数:: 35 ...
在实际编程中,我们或许会在代码量比较大的情况下,给我们的代码做一些调用痕迹的东西 比如当前调用的是哪个类,类得哪个方法: 一、获得当前类名: this.getClass().getName(); 二、获得当前方法名臣:    JDK1.4   new Exception().getStackTrace()[i].getMethodName();//其中i = 0就是当前的类的方法名字 ;i == 1就是调用者的方法    JDK1.5之后可用   Thread.currentThread().getStackTrace()[1].getMethodName();//具体使 ...
今天我在J2EE社区,遇到一个人提问: 问题:1 / (n * (n + 1));n从1开始,一直加到1 / (19 * 20),但是在运行过程中,s不会变化 public class Test { public static void main(String[] args) { double s = 0.0; int n = 1 ; do{ s = s + 1 / (n * (n + 1)); System.out.println(s); n = n + 1 ; System.out.println(s + "\t" ...
Global site tag (gtag.js) - Google Analytics