java技术
shheagle
这个作者很懒,什么都没留下…
展开
-
看看这段代码就知道char到底能不能放下中文字
public class TestMain{ /* * @author bobby * */ public static void main(String args[]){ char[] a=new char[1]; a[0]=中; System.out.println(a[0]); } } 因为java中以unicode编码,一个char占16个字节,所以放一个中文是没问题的。一个中文字也是原创 2008-04-24 10:19:00 · 518 阅读 · 0 评论 -
jsp页面跳转
使用JSP大约有下列三种跳转方式:1. response.sendRedirect();2. response.setHeader("Location","");3. 经过试验得到下面的一些规则:一. response.sendRedirect()此语句前不允许有out.flush(),如果有,会有异常:java.lang.IllegalStateException: Can转载 2008-05-15 10:58:00 · 457 阅读 · 0 评论 -
遇见 jxls
记得 刚刚参加工作的时候,看到老鸟们在做报表,写SQL,生成EXCEL,当时觉得很牛。很长时间没有接触java了,这些东西也记不得了,但是今天工作需要用到jxls,所以看了一下,原来如此啊。 jXLS is a small and easy-to-use Java library for writing Excel files using XLS templates and re原创 2010-05-14 11:25:00 · 1293 阅读 · 0 评论