title: Java Question: Is it possible to have a switch statement within another one?
body: <p>I have a yes or no question &amp; answer. I would like to ask another yes or no question if yes was the answer. My instructor wants us to use charAt(0) as input for the answer.</p>
  
  <p>Is it possible to have a switch statement within another one (like a nested if statement)? </p>
  
  <p>EDIT: Here is a sample of my pseudo code = </p>
  
  <pre><code>display "Would you like to add a link (y = yes or n = no)? "
  input addLink
  
  switch (link)
      case 'y':
          display "Would you like to pay 3 months in advance " + "(y = yes or n = no)?"
          input advancePay
  
                  switch(advPay)
                          case 'y':
                  linkCost = 0.10 * (3 * 14.95)
  
                  case 'n'
                  linkCost = 14.95            
      case 'n'
          linkCost = 0.00
  </code></pre>