title: Beginner Java problem: ____ cannot be resolved to a type
body: <p>I'm currently learning Java from <a href="https://www.learnjavaonline.org/en/Functions" rel="nofollow noreferrer">this tutorial</a>, and while the nomenclature sometimes confuses me (heavily with this chapter, actually), I'm good enough at figuring out why the code works. Except in this case, it doesn't, and it's not my code not working, it's the tutorial's.</p>
  
  <p>This is the snippet giving me problems:</p>
  
  <pre><code>public class Chapter6 {
  
      public void bar2(Student s1, Student s2) {
          Student joe = new Student("joe");
          Student jack = new Student("jack");
          bar2(joe, jack);
  
      }
  
  }
  </code></pre>
  
  <p>Eclipse complains that for line 3, Student cannot be resolved to a type (twice). I can fix this by creating a class called Student, but then it still complains for lines 4 and 5 that the constructor Student(string) is undefined. As my final attempt at solving it, I put this code in the Student class file (and changed the class in the first line from Chapter6 to Student), but that didn't solve anything.</p>
  
  <p>I'm happy for any help, and happier still if you could ELI5, because as I said, the nomenclature of functions really confuses me.</p>