View Single Post
Old Nov 30th, 2007, 12:39 PM   #2
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 856
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Re: retaining values in methods

You can declare the variable outside the method as a private class variable:

private int complete;
...
private float proc(int a, int b, boolean state) { ... }
titaniumdecoy is offline   Reply With Quote