title: Lambda expression Java 1.8 code to Java 1.6
body: <p>This <em>program</em> returns all the <em>synonyms</em> for a given input. But this code is for java 1.8. <strong>How to convert this code for Java 1.6.</strong></p>
  
  <pre><code>model.listIndividuals().forEachRemaining(ind -&gt; {
  
  if(((Resource)ind).getLocalName().toString().equalsIgnoreCase(input)){              
  System.out.println("Synonyms of " + ((Resource)ind).getLocalName().toString() + " are:");               
              ind.listPropertyValues(isSynonymOf).forEachRemaining(val -&gt; {                   
     System.out.println(" * " + ((Resource) val).getLocalName().toString());
  
              });
          }
      });
  </code></pre>