since it appears you are not modifing the variable inside your methods you could also simply pass it to each of your methods
eg:
import java.util.*;
public class Question2 {
...
Type: Posts; User: TheNextBillGates
since it appears you are not modifing the variable inside your methods you could also simply pass it to each of your methods
eg:
import java.util.*;
public class Question2 {
...