div的异常抛给main来处理: class Math{ public int div(int i,int j)throws Exception{ int temp=i/j; return temp; } } public class ThrowsDemo01 { public static voi...
分类:
其他好文 时间:
2014-08-05 10:42:19
阅读次数:
221
1、测试用例查看图片 public void viewImage() throws Exception { // 创建仓库服务对对象 RepositoryService repositoryService = processEngine.getRepositoryService(); // 从...
分类:
其他好文 时间:
2014-08-05 09:29:18
阅读次数:
349
这篇文章主要介绍Hadoop的系统配置类Configuration。接着上一篇文章介绍,上一篇文章中Hadoop Job的main方法为:public static void main(String[] args) throws Exception { int res = ToolRunne...
分类:
其他好文 时间:
2014-08-03 22:57:36
阅读次数:
435
这篇文章大致介绍Hadoop Job的程序是如何启动的。通常用Java编写的Hadoop MapReduce程序是通过一个main方法作为程序的整个入口,如下:public static void main(String[] args) throws Exception { int res ...
分类:
其他好文 时间:
2014-08-03 20:30:45
阅读次数:
307
五个关键字 和两个结构两个结构:1.ThrowableError表示错误Exception异常2.ExceptionRuntimeException(包括其子类)非RuntimeException(Checked异常)5个关键字:try, catch, finally, throws , throw...
分类:
编程语言 时间:
2014-08-01 18:32:32
阅读次数:
251
public class ReflectTest { public static void main(String[] args) throws Exception { ?? ?//config.properties 与当前类在不同包下; ?? ?InputStream is=ReflectTest.class.getResourceAsStream("/co...
分类:
编程语言 时间:
2014-08-01 16:21:42
阅读次数:
210
Java的异常处理是通过5个关键字来实现的:try,catch,throw,throws,finally。JB的在线帮助中对这几个关键字是这样解释的: Throws: Lists the exceptions a method could throw. Throw: Transfers co...
分类:
编程语言 时间:
2014-08-01 13:29:11
阅读次数:
271
public static void writeToXml(Map map,Writer writer) throws Exception, IllegalStateException, IOException{ XmlSerializer serializer = Xml.newSeriali.....
分类:
移动开发 时间:
2014-07-31 12:45:26
阅读次数:
295
Aeroplane chess
Problem Description
Hzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws a dice(a dice hav...
分类:
其他好文 时间:
2014-07-31 09:49:57
阅读次数:
208
package liupeng;
import java.io.File;
import org.json.JSONException;
import org.json.JSONObject;
public class Test {
/**
* 描述:二维码的生成
* @author liupeng
* @param args
* @throws JSONException
...
分类:
其他好文 时间:
2014-07-30 20:55:24
阅读次数:
234