title: Java return multiple strings in one method
body: <p>I am attempting to write a program which asks users what their pet name is, species, finds out thirst level and gives a response accordingly.</p>
  
  <p>I would appreciate if someone could help me with a problem im having, in  each of the 2 methods askpetname and thirstlevel there are 2 strings i want accessible throughout the entire class without using global variables.</p>
  
  <p>Can someone tell me what it is i am doing incorrectly or point me in the right direction.</p>
  
  <p>Also, i understand that my excess use of methods for tedious tasks is bad practice but it helps with memorising syntax.</p>
  
  <p>Thanks.</p>
  
  <pre><code>class dinoo
  {
  public static void main(String[] p)
  {   
  
  
      explain();
      output();
  
      System.exit(0);
  </code></pre>
  
  <p>}</p>
  
  <pre><code>public static void explain()
  {
  
      print("The following program demonstrates use of user input by       asking for pet name.");
  
      return;
  }
  
  public static String askpetname()
  {
      Scanner scanner = new Scanner(System.in);
  
      print("Name your dinosaur pet!");
  
      String petname = scanner.nextLine();
  
      print("Awesome, cool dinosaur name, what species is " + petname+ " ?");
  
      String petspecies = scanner.nextLine();
  
      return petname, petspecies;
  }
  
  public static int thirstlevel()
  {
      Random ran = new Random();
  
      int thirst = ran.nextInt(11);
      int hunger = ran.nextInt(11);
  
  
      return thirst,hunger;
  }
  
  public static String anger(int thirst, int hunger)
  {
      double angerscore = (thirst+hunger)/2;
      String temper;      
  
      if(angerscore&lt;=2)
      {
          temper = "Serene";
      }
  
      else if(3&lt;=angerscore&lt;=6)
      {
          temper= "Grouchy";
      }
  
      else if(6&lt;angerscore)
      {
          temper = "DANGEROUS";
      }
  
      return temper;
  }
  
  
  public static String warning()
  {
      if (temper.equals("Serene"))
      {
          print("He's looking happy!");
      }
      else if(temper.equals("Grouchy"))
      {
          print("Ahhh hes a bit "+temper+", you better start feeding him before he gets mad!");
      }
  
      else if(temper.equals("DANGEROUS"))
      {
          print("GET OUT OF THERE, HES " + temper+"!!!. He will have to be put down for everyones safety.");
      }
  
  }
  public static void output()
  {
      print(askpetname() + "'s, thirst level is "+thirstlevel()+"/10");
  
      return;
  } 
  
  
  
  public static String print(String message)
  {
      System.out.println(message);
  
      return message;
  }
  </code></pre>
  
  <p>}</p>