title: method calling using classes in scala
body: <p>I am trying to run this program but it is telling me that r is not found. How do you call the method since it is in a class? (I am assuming that the error is because of this)</p>
  
  <pre><code>package pack
  
  class Sud(val grid: List[List[Int]]) {
  
    def r(r: Int): List[Int] =
    //code
  }
  
  object Sud
  {
    def main(args: Array[String]) 
    {
  
       val puzzle=new Sudoku(List(
            List(0, 0, 9, 0, 0, 7, 5, 0, 0),
          //rest of Sudoku puzzle created by repeating the above statement
  
            println(r(0)) //ERROR given here
    }
  }
  </code></pre>