How can I get the user input and read it into other method I tried this code but it keeps saying that the variable is not defined
public stat