package com.jj;public class Dt extends Root {
int i1=100;
Dt(){
System.out.println(this+"++++"+i1);
}
S1 t3=new S1();
S2 t4=new S2();
Root t5=new Root();
void syas(){
System.out.println("************"+i1);
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Dt r1=new Dt();
}
}class S1{
S1(){
System.out.println(this);
} }
class S2{
S2(){
System.out.println(this);
} }
class Root{
S1 t1=new S1();
S2 t2=new S2();
Root(){
System.out.println(this);
syas();
}
void syas(){
System.out.println();
}
}
int i1=100;
Dt(){
System.out.println(this+"++++"+i1);
}
S1 t3=new S1();
S2 t4=new S2();
Root t5=new Root();
void syas(){
System.out.println("************"+i1);
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Dt r1=new Dt();
}
}class S1{
S1(){
System.out.println(this);
} }
class S2{
S2(){
System.out.println(this);
} }
class Root{
S1 t1=new S1();
S2 t2=new S2();
Root(){
System.out.println(this);
syas();
}
void syas(){
System.out.println();
}
}
解决方案 »
- 关于一种泛型方法的作用
- 一直报错:Fatal exception occurred,program will exit··为什么?怎么解决?
- 谁能帮我解释下这个问题,很基础的Java问题,我有点不明白?
- 主方法的问题
- java JTable 的print方法
- 写一个函数,检查字符串是否为整数,如果是,返回其整数值
- 新手求助,这个程序为什么执行不了啊!
- application中能跑的程序applet中不能跑,多谢指点
- 哪位大侠能告诉我哪里能下载java api的文档,是chm类型的。谢谢
- java读取XML报NullPointerException的错误
- 反射在JAVA起到的作用!(高手请进)
- 【100分】谁能给解释一下这段代码,很短的代码?
System.out.println(this+"++++"+i1);
}
打印出来是100
void syas(){
System.out.println("************"+i1);
}
打印出来是0 在Dt r1=new Dt();时