dance-elephant

常用链接

统计

Ant

最新评论

2009年3月21日 #

ant include exclude

include,exclude主要运用于fileset:
<fileset dir="">
   <include name="">
  <exclude name="">
</fileset>
include 和exclude中的值是大小写区分的,可以通过设置casesensitive="false"来取消它
另外,可以通过设置defaultexcludes="no"可以关闭默认排除模式。



posted @ 2009-03-21 23:08 dance_elephant 阅读(685) | 评论 (0)编辑 收藏

2008年8月12日 #

j2me 编程中如何使用kxml解析xml

j2me 编程中如何使用kxml解析xml,希望能给我一个实例以及相关资料,小弟在此谢过了

posted @ 2008-08-12 15:19 dance_elephant 阅读(487) | 评论 (1)编辑 收藏

2008年7月24日 #

TreeSet?

TreeSet中如果加入的对象是自己编写的一个类的实例,比如class MyType{};
那么MyType 除了要实现Comparable接口外,equals方法到底要不要自己重新编写?
自己编程测试时,发现equals 方法有没重写好像无关痛痒吗?
路过的各位,希望能给小弟留下一道痕迹
在此谢啦

posted @ 2008-07-24 01:07 dance_elephant 阅读(264) | 评论 (1)编辑 收藏

2008年7月15日 #

重掷异常时如何捕获这个异常?

class OneException extends Exception {
 public OneException(String s){
  super(s);
 }
}
class TowException extends Exception{
 public TowException(String s){
  super(s);
 }
}
public class RethrowNew{
 public static void f()throws OneException{
  System.out.println("originationg the exception in f()");
  throw new OneException("thrown from f()");
 }
 public static void main(String[] agrs)throws Throwable{
  try{
   f();
  }
  catch(OneException e){
   System.err.println("caught in main,e.printstacktrace()");
   e.printStackTrace(System.err);
   throw e;
  }
 }
}
在main()的catch()中我抛出异常e:throw e;但不知这个异常如何被捕获,哪位
高手可以帮小弟解决一下啊。
上述程序的运行结果如下:
originationg the exception in f()
caught in main,e.printstacktrace()
OneException: thrown from f()
 at RethrowNew.f(RethrowNew.java:15)
 at RethrowNew.main(RethrowNew.java:19)
Exception in thread "main" OneException: thrown from f()//不知道这段信息如何出来
 at RethrowNew.f(RethrowNew.java:15)
 at RethrowNew.main(RethrowNew.java:19)

posted @ 2008-07-15 16:35 dance_elephant 阅读(445) | 评论 (1)编辑 收藏

仅列出标题