易截截图软件、单文件、免安装、纯绿色、仅160KB

Effective Java: Item 1

Static Factory Methods
Four Advantages:
1) have names
2) not required to create a new object each time they are invoked
3) return an object of any subtype of their return type
4) reduce the verbosity of creating parameterized type instances.(for example: newInstance() method)


相关文档:

java IO learning

java学习:彻底明白Java的IO系统
文章来源:互联网
一. Input和Output
1. stream代表的是任何有能力产出数据的数据源,或是任何有能力接收数据的接收源。在Java的IO中,所有的stream(包括Input和Out stream)都包括两种类型:
1.1 以字节为导向的stream
以字节为导向的stream,表示以字节为单位从stream中读取或往st ......

Java实现链表

class Link
{
private Node head;
public Link(Node head)
{
this.head=head;
}
public void addNode(Node node)
{
Node p=head;
while(true)
{
if(!p.hasNext())
{
p.setNext(node);
break;
}
p=p.getNext();
}
}
//插入节
public void insertNode(Node p,Node q)
{
q.setNext(p.getNext());
p.se ......

java 实现中英文混时得到长度 过长字符替换

java 代码实现
 public static boolean isLetter(char c) { 
                 int k = 0x80; 
                 return c / k == 0 ? true : false;& ......

Java线程:线程的同步与锁

一、同步问题提出
 
线程的同步是为了防止多个线程访问一个数据对象时,对数据造成的破坏。
例如:两个线程ThreadA、ThreadB都操作同一个对象Foo对象,并修改Foo对象上的数据。
 
public
class
Foo {
    private
int
x = 100;
    public
int
get ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号