Win a copy of Head First Android this week in the Android forum!

Akin Ola

Greenhorn
+ Follow
since Jul 18, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Akin Ola

d finalize() method as u put it in ur program works on my system )
//if this is the code u meant to ask about here's the explanation

class JMM110 {
public static void main (String[] args) {
int j = 0;

do
for (int i = 0;i++ < 2
System.out.print(i);
while (j++ < 2);
}
}

//what's happening is pretty straight forward
//u've got 2 loops, the outer one is the do-loop, the innner one is a for-loop
//the outer loop iterates twice but each time the do-loop goes thru an iteration
//the inner (for) loop also iterates twice printing '12' each time
//so ur final output is 1212 .... easy!
Dudes, thanx for all the links and tutorials, and ideas about how to pass this cert. I did my exam today and i totally nailed it. For those of you who are not sure (even after using java for 3 years like me), if i can pass (80%), then u can... just read the tutorial links here and do as many mock exams as u possible can.
Thanx JavaRanch...
15 years ago