title: Orphaned Case Error in Java
body: <p>Im a beginner in the coding world. I have been learning Java recently when i came across a speedbump. </p>
  
  <p>First of all heres the code :</p>
  
  <pre><code>import  java.util.*;
  public class Stuff {
  
      public static void main(String []args); {
  
  
          Scanner identity = new Scanner(System.in);
  
          String id;
  
          System.out.println("Please Enter Your Name :");
          id = identity.next();
  
          Switch (id); {
  
              case "name1":
              //some code here....
              break; 
  
              case "name2":
              //some code here....
              break;
  
              case "name3":
               //some code here....
              break;
  
              case "name4":
              //some code here....
              break;
  
              default :
              //some code here....
              break;
          }
  
  
      }
  
  }
  </code></pre>
  
  <p>The error</p>
  
  <pre><code> Error: Orphaned case
           case: "name1";
  </code></pre>
  
  <p>I cant seem to find why this is happening and have googles to no avail.</p>
  
  <p>Edit : Some people have said that I am ending Switch early with the semi colon. But when i add it, i get a new error along with the previous one: </p>
  
  <pre><code>Error: ';' expected
          Switch (id) {
                ^ 
  </code></pre>