title: Conversion source 1.7 and source < 1.7 in Java
body: <p>I've made some utilities which I can use in several applications I'm making. The most of the applications support source 1.7, but some of them don't (for example, Android applications).</p>
  
  <pre><code>ArrayList&lt;String&gt; list = new ArrayList&lt;&gt;();
  String s = "hi";
  switch (s) {
      case "hi":
  </code></pre>
  
  <p>For example, diamond operators and switching over strings are not supported in a Java version below 1.7.</p>
  
  <p>I want the source code to be converted to be compatible with a source below 1.7 when I build an Eclipse or Netbeans project.</p>
  
  <p>Can I achieve that? If yes, how? If not, then what should I do instead? Manually replace all source code to 1.6-compatible?</p>