Mr.weber,here are two questions to knowing the result and output of a code.
Firstly,
9.public void run(){
10.system.out.print ("go");
And
18.t.run();
19.t.run();
20.t.start();
what is the result?
a.go
b.go go
c.go go go
d.compilation fail
e.an exception is thrown at runtime
answer is c. i don't know why c?
secondly,
1.class Output{
2.public static void main (
string[] args){
3.int i=4;
4.system.out.print("3" +i +" "){
5.system.out.print(i+4+"6");
6.system.out.println(i+"7");
what is the result?
a.7.8611
b.7.44647
c.34.8611
d.34.8647
e.34.44611
f.34.44647
the answer is d.
Pls, how d is correct.
Mr.weber i saw the 2 questions from sun microsystem scjp 5.0 e-practise.
Thanks a lot.