Which input value causes the loop body to execute a 2nd time, thus outputting "In loop" again? Strings="Go"; while ((!s.equals("q")) && (!s.equals("Q"))) { System.out.println("In loop"); s = scnr.next(); }     a.   "q" only     b.   "Q" only     c.   Either "q" or "Q"     d.   "Quit"     JAVA

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question
  1. Which input value causes the loop body to execute a 2nd time, thus outputting "In loop" again?

    Strings="Go";
    while ((!s.equals("q")) && (!s.equals("Q"))) {
    System.out.println("In loop");
    s = scnr.next();
    }




     

      a.

     

    "q" only

     

      b.

     

    "Q" only

     

      c.

     

    Either "q" or "Q"

     

      d.

     

    "Quit"

     

     

    JAVA

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,