aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Breaking code down Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Breaking code down" Watch "Breaking code down" New topic
Author

Breaking code down

Douggie Fox
Greenhorn

Joined: Jun 14, 2001
Posts: 19
Hi,
If you have a long, tricky piece of code that needs decifering in the exam, does anyone have any techniques for keeping track of variables?
Paul
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4133
    
    2

For tracing variables in loops, I use a table to keep track of iterations and values:
<pre>
int x=0;
int y=0;
for (int i = 0; i < 10; i++)
{
... do something with x and y
}

i : x : y
0 : ? : ?
1 : ? : ?
2 : ? : ?
3 : ? : ?
4 : ? : ?
</pre>
Use a similar technique for tracing through various methods.

Junilu - [How to Ask Questions] [How to Answer Questions] [MiH]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Breaking code down
 
Similar Threads
Thread synchronization
Simple Problem
Creating Arrow Icon Help
Problem is running EL FUnction
about finally