/**
* Copyright 2005-2006 123steel.cn, Inc. All rights reserved.
*/
package cn.sqsoft.util;
class Bowl
{
public Bowl(int mark)
{
System.out.println("Bowl("+mark+")");
}
void f(int mark)
{
System.out.println("f("+mark+")");
}
}
class Table
{
static Bowl b1 = new Bowl(1);
public Table()
{
System.out.println("Table()");
b2.f(1);
}
void f2(int mark)
{
System.out.println("f2("+mark+")");
}
static Bowl b2 = new Bowl(2);
}
class CupBoard
{
Bowl b3 = new Bowl(3);
static Bowl b4 = new Bowl(4);
public CupBoard()
{
System.out.println("CupBoard()");
b4.f(2);
}
void f3(int mark)
{
System.out.println("f3("+mark+")");
}
static Bowl b5 = new Bowl(5);
}
/**
* @author shiqiang,123steel
* @Function StaticInit.java
* @Date 2005-11-11
*/
public class StaticInit
{
/**
* @param args
*/
public static void main(String[] args)
{
System.out.println("开始");
new CupBoard();
System.out.println("开始");
new CupBoard();
t2.f2(1);
t3.f3(1);
}
static Table t2 = new Table();
static CupBoard t3 = new CupBoard();
}
浙公网安备 33010602011771号