title: How to refer to the value of an object from the method defined - Java
body: <p>So I have a method as outlined below:</p>
  
  <pre><code>    public interface Definitions{
        public boolean isEmpty();
      }
  
      public class Methods implements Definitions{
        public boolean isEmpty{
        //Insert code here
        }
  
        public static void main(String[] args){
        return;
        }
      }
  </code></pre>
  
  <p>This method does not take parameters/arguments when it is executed, it just has to return a boolean variable defining whether or not the original object that used it is empty or not, e.g.</p>
  
  <pre><code>    public class NewClass{
        public static void main(String[] args){
        Methods newObject = new Methods();
        return newObject.isEmpty();
      }
  </code></pre>
  
  <p>How would I define the method "isEmpty" in order to return a true or false value? My main problem is handling / retrieving the value of the object that uses it. Thanks in advance</p>
  
  <p>One thing I forgot to mention in the question is, the class Methods implements an interface. I have fixed it above. Sorry for the confusion.</p>