Rewrite this statement so it makes only one comparison and


The following if statement determines whether choice is equal to ‘ Y ' or ‘ y ':

if (choice == 'Y' || choice == 'y')

Rewrite this statement so it makes only one comparison and does not use the || operator. (Hint: Use either the toUpperCase method.)

if ( == 'Y')

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Rewrite this statement so it makes only one comparison and
Reference No:- TGS0646355

Expected delivery within 24 Hours