title: Program to find if a string length is odd or even
body: <p>I am creating a program to find out if a string that is entered has an odd or even amount of characters.  I am having trouble with the runner class, because whenever I enter a string, it just prints it back and doesn't carry out the different methods that I have in my main class. How do I call for the methods in the runner class?</p>
  
  <p>MAIN CLASS:</p>
  
  <pre><code>import static java.lang.System.*;
  import java.util.Scanner;
  
  public class stringoddoreven
  {
      private String word;
  
      public stringoddoreven()
      {
          setString("");
      }
  
      public stringoddoreven(String s)
      {
          setString(s);
      }
  
      public void setString(String s)
      {
          word = s;
      }
  
      public boolean isEven()
      {
          if (word.length() % 2 == 0)
          return true;
          return false;
      }
  
      public String toString()
      {
          if (isEven())
              return word + " is even.";
              return word + " is odd. ";
      }
  }
  </code></pre>
  
  <p>RUNNER CLASS:</p>
  
  <pre><code>import static java.lang.System.*;
  import java.util.Scanner;
  
  public class stringrunner
  {
      public static void main ( String[] args )
      {
          Scanner keyboard = new Scanner(in);
  
          System.out.print("Enter a String :: ");
          String word = keyboard.next();
  
          System.out.println(word.toString());
  
      }
  }
  </code></pre>