Okay, don't ask me how I don't know this but say i declare a variable in my main public for example

Code:
	public client() {
        int detail = 1;
        }
and lets say under a new public void i need to check what detail is.
Code:
  	public void somethingrandom() 
	{
            if (detail == 0) {
            parameters.put("detail", "1");
            } else {
	    parameters.put("detail", "0");
	    }
       }
How can i get the variable value from public into my public void. Because apparently it is not declared. If i add int detail = 1; to the void somethingrandom then that deletes the objective because it will always be 1.