title: How to create a class with multiple method and then pass the values back to the main method
body: <p>I am trying to create a class that has a few methods in it. I am attempting to only pass the values entered by the user into the methods. Then, each method is run and the value is printed in the main method. Here is what I have.</p>
  
  <pre><code>public class HotelRating{
     private int hotel = 0;
     private int years = 0;
     int [][] Ratingarray = new int [hotel][years];
  
     public HotelRating(){
     }
  
  
     public HotelRating(int hotel, int years){
     this.hotel = hotel;
     this.years = years;
          for (int row = 0; row &lt; Ratingarray.length; row++){
           for (int column = 0; column &lt; Ratingarray[row].length; column++){
              Ratingarray[row][column] = (int) (Math.random() * 5 + 1);
           }
        }
     }
  
     public String fiveStarsHotels(){
        String result = "";
        System.out.print("Five stars hotels indices: ");
        System.out.println();
        for (int row = 0; row &lt; Ratingarray.length; row++){
           for (int column = 0; column &lt; Ratingarray[row].length; column++){
              switch (Ratingarray[row][column]){
                 case 1:
                    break;
                 case 2:
                    break;
                 case 3:
                    break;
                 case 4:
                    break;
                 case 5:
                    result = (row + 1 + ",");
              }
           }
        }
        return result;
     }
  
    }
  </code></pre>
  
  <p>Here is how I am attempting to call this method in the main method:</p>
  
  <pre><code>import java.util.*;
  public class TestHotelRating{
     public static void main (String[] args){
           Scanner input = new Scanner(System.in);
  
           System.out.println ("Please enter the amount of hotels: ");
           int hotel = input.nextInt();
  
           System.out.println ("Please enter the number of years: ");
           int years = input.nextInt();
  
           HotelRating myObject = new HotelRating (hotel, years);
  
           System.out.println(myObject.fiveStarsHotels());
        }
     }
  }
  </code></pre>
  
  <p>When I call the method, it returns nothing. I'm not sure why.</p>