I am new to java. I want to know how I can use the variable in the whole java class and keeping the value of it. Suppose in a method I fill the variable with a value and I want to use the value of it in another method.
public class Test {
public String id;
public void includeClient() {
String id = baseClass.createCleint();
}
public void includeClientremoveClient() {
System.out.println(id);
}
}
in second function it returns null. Any idea?