
JAVA
NewJerseySautan
Nothing to introduce
展开
-
Java多态例子
最近想要找工作,看了些招聘的笔试题.其中一个就是用多态方式表现猫咬狗咬的. 于是写了一个简单的例子,但觉得对这个概念的理解还不是特别深入,希望大家斧正 我创建了一个Animal接口 : public interface Animal { public void bite(); } 又建立了一个Polymorphizm类 public class Polymorphi...2009-03-30 17:25:22 · 166 阅读 · 0 评论 -
递归实现加法
又是一道面试的练习题 : 用递归实现加法这是我写的: public class SumPlus { public static void main(String args[]) { int[] num = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int x = 10; Sum...2009-03-30 17:55:09 · 452 阅读 · 0 评论 -
The constructor FileReader(String) is undefined
今天想写个程序给一批文件改个名,可是一直无法初始化FileReader,明明在JDK上查到了构造函数的用法,可用起来就是提示The constructor FileReader(String) is undefined,仔细检查了一下才发现,原来类的名字就是FileReader,被当成构造函数处理了。。。。...2009-11-17 21:01:27 · 3245 阅读 · 1 评论 -
查看Java类库源码
1.点 “window”-> "Preferences" -> "Java" -> "Installed JRES" 2.此时"Installed JRES"右边是列表窗格,列出了系统中的 JRE 环境,选择你的JRE,然后点边上的 "Edit...", 会出现一个窗口(Edit JRE) 3.选中rt.jar文件的这一项:“c:\program files\java2009-11-18 16:10:58 · 246 阅读 · 0 评论 -
Java中的初始化顺序
public class Test { { System.out.println("In non-static initialization block!"); } static { System.out.println("In static initialization block!"); } ...2009-06-16 20:36:02 · 129 阅读 · 0 评论 -
介绍Java EE 6 Platform : Part 1
Java Platform,Enterprise Edition (Java EE) 作为业界标准使用Java语言来编写企业级的程序。基于稳固的Java平台基础和Standard Edition (Java SE),Java EE新增了一些库和系统服务以支持扩展性,访问性,安全性,整合性以及其他企业级程序的需求。 自从1999年它的最初发布,Java EE已经成长为一个拥有丰富函数且...2009-12-17 21:25:46 · 260 阅读 · 0 评论 -
How to explain my project architecture
I have attended some interview recently. i came across with a common question in both the interviews. The Question is "Can you explain your current project architecture?" i have answered that question...原创 2010-06-18 23:19:33 · 378 阅读 · 0 评论 -
Return zero length collections or arrays as opposed to returning null
Returning null instead of zerolength collection (use Collections.EMPTY_SET, Collections.EMPTY_LIST, Collections.EMPTY_MAP) is moreerror prone, since the programmer writing the calling method might for...原创 2010-06-28 17:25:21 · 232 阅读 · 0 评论