title: Can't call a method from another class in same package(JAVA)
body: <p>i can't call a method from another class within the same package. it shows me error "cannot find symbol".
  here is the code of called class</p>
  
  <pre><code>package demo;
  import java.util.*;
  public class sample
  {
  protected void play()
  {
  //some code here....
  }
  public String game(int num)
  {
  //calling play() method...
  return str;
  }
  }
  </code></pre>
  
  <p>and here is the calling class..</p>
  
  <pre><code>package demo;
  import java.util.*;
  public class sample1
  {
  protected void playGame()
  {
  game(num);
  }
  }
  </code></pre>
  
  <p>I used two methods, first is creating instance of the sample class. And second is with static keyword. Both shows the same error.</p>