Which of the following statements correctly outputs the names of voters who live in district 6 and

Question:

Which of the following statements correctly outputs the names of voters who live in district 6 and all voters who live in district 7?
a. if(district == 6 || 7)
System.out.println("Name is " + name);
b. if(district == 6 || district == 7)
System.out.println("Name is " + name);
c. if(district = 6 && district == 7)
System.out.println("Name is " + name);
d. Two of these

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Programming

ISBN: 978-1337397070

9th edition

Authors: Joyce Farrell

Question Posted: