class StaticCode
{
StaticCode()();//这里老是编译不过,总说缺少符号,求大神指教。
static
{
System.out.println("a");
}
public static void show()
{
System.out.println("show run");
}
}
class StaticCodeDemo
{
static
{
System.out.println("b");
}
public static void main(String[] args)
{
new StaticCode();
System.out.print("over");
}
static
{
System.out.println("c");
}
} |
|