title: How do I call for variables from another method in same class, as well as call upon the method?
body: <p>I am struggling to understand the concept of declaring and calling upon classes as well as the traffic of variables between them. 
  In the code I have now I believe there are several problems, but the main one right now is that the main-method isn't able to use the returned value from another method, I do believe I got the rest right. 
  The code:</p>
  
  <pre><code>import java.util.*;
  import java.io.*;
  
  class Uke63{
      public static void main(String[]args){
  
          char c='t';
          String tekst="Jabba the Hutt var en stygg fyr";
  
          forekommer(c, tekst);
  
          System.out.println(retval.forekommer);
  
      }
  
      static boolean forekommer(char c, String tekst){
  
          boolean retval=tekst.contains(c);
          return retval;
      }
  }
  </code></pre>
  
  <p>And the error I get when trying to compile: (I do see that it doesn't find the value, but I need some help on how to make it find that particular value.)</p>
  
  <pre><code>makri@Marius-samlap:~/Programmering/Ukeoppgaver$ javac Uke63.java
  Uke63.java:12: error: cannot find symbol
      System.out.println(retval.forekommer);
                         ^
    symbol:   variable retval
    location: class Uke63
  Uke63.java:18: error: method contains in class String cannot be applied to given types;
      boolean retval=tekst.contains(c);
                          ^
    required: CharSequence
    found: char
    reason: actual argument char cannot be converted to CharSequence by method invocation conversion
  2 errors
  </code></pre>