title: How to fix 'illegal start of expression' error for the second method?
body: <p>I'm trying to finish an assignment with nested if/else structures and while loops. However, somehow my second method is causing errors. Let me know if you can help me, as this is my first question on SO.</p>
  
  <p>I've tried closing the first method with brackets, but this only caused more errors. I don't know where else to go from here, I've looked all over google for help.</p>
  
  <pre><code>import java.util.*;
  public class PA1 {
  
  
    public static void main(String[] args) {
      Scanner in = new Scanner(System.in);
  
      while((senitel == 'y')||(senitel == 'Y')); {
        menu();
        System.out.printf("Enter your choice: ");
        choice = in.nextInt();
        redo = in.nextLine();
        while(choose ==true) {
          if(choice==1) {
            choice = false;
            computer = "HP Envy 13\n";
            System.out.printf("Enter the quantity for the %s", computer);
            quantity = in.nextInt();
            subtotal = subtotal +799.99; }
          else if (choice==2) {
            choose = false;
            computer = "Asus ZenBook 13 UX333FA\n";
            System.out.printf("Enter qunatity for the %s", computer);
            quantity = in.nextInt();
            subtotal = subtotal + 849.99; }
          else {
            choose = false;
            System.out.println("In Else");
            System.out.printf("Invalid choice! Try again.\n");
            System.out.printf("Enter 'Y' to add a laptop to your purchase or 'N' to exit: ");
            redo = in.nextLine(); }
  
          if((choice&gt;=1)&amp;&amp;(choice&lt;=5)) {
            choice = true;}
          else {
            choice = false;
            menu();
            choice = in.nextInt();}}
  
        redo = in.nextLine();
        System.out.printf("Enter 'Y' to add a laptop to your purchase or 'N' to exit: ");
        reply = in.nextLine();
        senitel = reply.charAt(0);}
  
      System.out.println("Out");
      choice = 3;
  
      if(choice&gt;0) {
        if(choice&lt;6) {
          System.out.printf("LAPTOP ORDER SUMMARY\n\n");
          System.out.printf("%s",orderSummary);
          System.out.printf("Date:\n");
          System.out.printf("Time:\n\n");
          tax = subtotal + .0825;
          total = subtotal + tax;
          int trigger =1;
  
       String laptop = "";
       int lineItem = 0;
       if(trigger == 1) {
         orderSummary += String.format("%n%,-9d %-30s %8s $%,17.2f",
                           qty, laptop, " ", lineItem);
         trigger = 0; }
       else {
         orderSummary += String.format("%n%,-9d %-30s %9s %,17.2f",
                           qty, laptop, " ", lineItem);}
  
  
       orderSummary += String.format("%n%n%34s Subtotal %6s %,17.2f"
                                       + "%n%31s Tax @ 8.25%% %6s %,17.2f"                    
                                       + "%n%n%37s TOTAL %5s $%,17.2f%n",
                                       " ", " ", subtotal,
                                       " ", " ", tax,
                                       " ", " ", total);
       System.out.printf("%s", orderSummary); }}
  
  
  
  public static void menu(){
  Calendar dateTime = Calendar.getInstance();
  System.out.printf("%nTOP LAPTOPS OF %tY"
                      + "%n%n1.  %-23s %7s $%,9.2f"
                      + "%n2.  %-23s %8s %,9.2f"
                      + "%n3.  %-23s %8s %,9.2f"
                      + "%n4.  %-23s %8s %,9.2f"
                      + "%n5.  %-23s %8s %,9.2f"
                      + "%n%nEnter your choice:  ",
                      dateTime,
                      "HP Envy 13", " ", 799.99,
                      "Asus ZenBook 13 UX333FA", " ", 849.99,
                      "Dell XPS 13", " ", 989.99,
                      "Alienware Area 51-m", " ", 1999.99,
                    "Razer Blade Stealth", " ", 1299.00); }
  
  
  
  public static void trig() {
    int trigger = 1;
    String orderSummary = "";
    int quantity = 0;
    String laptop = "";
    int lineItem = 0;
    if(trigger==1) {
      orderSummary += String.format("%n%, -9d %-30s %8%s $%, 17.2f",
                                    quantity, laptop, " ", lineItem);
      trigger =0; }
    else {
      orderSummary += String.format("%n%, -9d %-30s %9s %, 17.2f",
                                    quantity, laptop, lineItem); }
  
    orderSummary += String.format("%n%n%34s Subtotal %6s %,17.2f"
                                       + "%n%31s Tax @ 8.25%% %6s %,17.2f"                    
                                       + "%n%n%37s TOTAL %5s $%,17.2f%n");
  
    System.out.printf("%s", orderSummary); }}
  </code></pre>