title: How do I Restart this class? or unload and load it?
body: <p>I have a class, with a bunch of println's, and then I have a switch. the point is that the user has 3 options, 1 of them is wrong and takes him back to the start. I tried recreating the class from inside the class, but it didnt work, because when it would finish the recent class, it would go back to the previous class and finish it. Maybe the solution is simple, and I just don't know how to do it, I have been programing for 2 weeks in school... If you need an example, I can type one, but its just a switch with 3 cases inside it, where 2 of them say diferent things, but break the switch anyway, and the 3rd says something else, but restarts.
  Any sugestions?</p>
  
  <pre><code>  Switch (choice1){
    case 1: System.out.println("Blabla"); break;
    case 2: System.out.println("Blabla"); break;
    case 3: System.out.println("Blabla"); break;
    default: System.out.println("That is not a valid number."); break;}
  </code></pre>
  
  <p>There... its just a switch...
  EDIT: Just so you know, as I said, I don't really know much about programing with java yet, so I don't think I can fix this without some code help.</p>
  
  <p>SOLVED! by myself. Look down</p>
  
  <pre><code>      Switch (choice1){
        case 1: System.out.println("Blabla"); break;
        case 2: System.out.println("Blabla"); break;
        case 3: System.out.println("Blabla"); break;
        default: System.out.println("That is not a valid number."); nameoftheclass nameoftheobject = new nameofthemethod(); break;}
        if (choice1 &gt;2)
            {}
        else
            {rest of the code...}
  </code></pre>