SlideShare a Scribd company logo
1 of 1
Download to read offline
Convert the following if -else-if statement into a switch statement: if (choice =1) { System.out,print
ln( "You selected 1." "); } else if (choice =21 choice =3){ System.out.print ln( "You selected 2 or 3."
); else if (choice ==4 ) { System.out.println("You selected 4." ); } else { System.out.println("Select
again please."); } 11. Match the conditional expression with the if -else statement that performs the
same operation. a. q=x<y?a+b:x2; b. q=x<y?x2:a+b; c. q=x<y?0:1;

More Related Content

More from devangmittal4

CRANdan dslabs paketini kurun ardndan library komutuyla .pdf
CRANdan dslabs paketini kurun ardndan library komutuyla .pdfCRANdan dslabs paketini kurun ardndan library komutuyla .pdf
CRANdan dslabs paketini kurun ardndan library komutuyla .pdfdevangmittal4
 
Craft a script in a file named plusQ1 that prompts the us.pdf
Craft a script in a file named plusQ1 that  prompts the us.pdfCraft a script in a file named plusQ1 that  prompts the us.pdf
Craft a script in a file named plusQ1 that prompts the us.pdfdevangmittal4
 
Crane Company had a beginning inventory of 100 units of Prod.pdf
Crane Company had a beginning inventory of 100 units of Prod.pdfCrane Company had a beginning inventory of 100 units of Prod.pdf
Crane Company had a beginning inventory of 100 units of Prod.pdfdevangmittal4
 
Coursera learning python interacting with operating system .pdf
Coursera learning python interacting with operating system .pdfCoursera learning python interacting with operating system .pdf
Coursera learning python interacting with operating system .pdfdevangmittal4
 
Crane Company manufactures pizza sauce through two productio.pdf
Crane Company manufactures pizza sauce through two productio.pdfCrane Company manufactures pizza sauce through two productio.pdf
Crane Company manufactures pizza sauce through two productio.pdfdevangmittal4
 
CPP Introduction types of benefits eligibility of benefit.pdf
CPP Introduction types of benefits eligibility of benefit.pdfCPP Introduction types of benefits eligibility of benefit.pdf
CPP Introduction types of benefits eligibility of benefit.pdfdevangmittal4
 
COVID19 is going to change the way fast food restaurants pr.pdf
COVID19 is going to change the way fast food restaurants pr.pdfCOVID19 is going to change the way fast food restaurants pr.pdf
COVID19 is going to change the way fast food restaurants pr.pdfdevangmittal4
 
Course Organization Modeling for DT 11 The Ecosystem map .pdf
Course Organization Modeling for DT 11 The Ecosystem map .pdfCourse Organization Modeling for DT 11 The Ecosystem map .pdf
Course Organization Modeling for DT 11 The Ecosystem map .pdfdevangmittal4
 
cowan Company currently pays a 300 dividend The Board has.pdf
cowan Company currently pays a 300 dividend The Board has.pdfcowan Company currently pays a 300 dividend The Board has.pdf
cowan Company currently pays a 300 dividend The Board has.pdfdevangmittal4
 
country is Ethiopia Use the UNCTAD STAT Country Profile site.pdf
country is Ethiopia Use the UNCTAD STAT Country Profile site.pdfcountry is Ethiopia Use the UNCTAD STAT Country Profile site.pdf
country is Ethiopia Use the UNCTAD STAT Country Profile site.pdfdevangmittal4
 
Course Participation Strategies to Compete in the Markets .pdf
Course Participation  Strategies to Compete in the Markets .pdfCourse Participation  Strategies to Compete in the Markets .pdf
Course Participation Strategies to Compete in the Markets .pdfdevangmittal4
 
Course ELECTRONIC HEALTH RECORDS Feild of Study INFORMATI.pdf
Course ELECTRONIC HEALTH RECORDS Feild of Study INFORMATI.pdfCourse ELECTRONIC HEALTH RECORDS Feild of Study INFORMATI.pdf
Course ELECTRONIC HEALTH RECORDS Feild of Study INFORMATI.pdfdevangmittal4
 
Courts stick to objective reasonable person standards when.pdf
Courts stick to objective reasonable person standards when.pdfCourts stick to objective reasonable person standards when.pdf
Courts stick to objective reasonable person standards when.pdfdevangmittal4
 
Course Name Healing 3 Lab Activity 6 Activity Title Dealin.pdf
Course Name Healing 3 Lab Activity  6 Activity Title Dealin.pdfCourse Name Healing 3 Lab Activity  6 Activity Title Dealin.pdf
Course Name Healing 3 Lab Activity 6 Activity Title Dealin.pdfdevangmittal4
 
Country Ethiopia Currency Chapter 7 What is the current.pdf
Country Ethiopia Currency Chapter 7   What is the current.pdfCountry Ethiopia Currency Chapter 7   What is the current.pdf
Country Ethiopia Currency Chapter 7 What is the current.pdfdevangmittal4
 
Count the number of zeros in a BYTE located at memory locati.pdf
Count the number of zeros in a BYTE located at memory locati.pdfCount the number of zeros in a BYTE located at memory locati.pdf
Count the number of zeros in a BYTE located at memory locati.pdfdevangmittal4
 
Country analysis Ethiopia Trade chapter 5 How does the.pdf
Country analysis Ethiopia  Trade chapter 5  How does the.pdfCountry analysis Ethiopia  Trade chapter 5  How does the.pdf
Country analysis Ethiopia Trade chapter 5 How does the.pdfdevangmittal4
 
could you please help me with this question just simple info.pdf
could you please help me with this question just simple info.pdfcould you please help me with this question just simple info.pdf
could you please help me with this question just simple info.pdfdevangmittal4
 
Could you take a look at this Python code Towards the botto.pdf
Could you take a look at this Python code Towards the botto.pdfCould you take a look at this Python code Towards the botto.pdf
Could you take a look at this Python code Towards the botto.pdfdevangmittal4
 
Could someone help with this code include Armourh .pdf
Could someone help with this code include Armourh   .pdfCould someone help with this code include Armourh   .pdf
Could someone help with this code include Armourh .pdfdevangmittal4
 

More from devangmittal4 (20)

CRANdan dslabs paketini kurun ardndan library komutuyla .pdf
CRANdan dslabs paketini kurun ardndan library komutuyla .pdfCRANdan dslabs paketini kurun ardndan library komutuyla .pdf
CRANdan dslabs paketini kurun ardndan library komutuyla .pdf
 
Craft a script in a file named plusQ1 that prompts the us.pdf
Craft a script in a file named plusQ1 that  prompts the us.pdfCraft a script in a file named plusQ1 that  prompts the us.pdf
Craft a script in a file named plusQ1 that prompts the us.pdf
 
Crane Company had a beginning inventory of 100 units of Prod.pdf
Crane Company had a beginning inventory of 100 units of Prod.pdfCrane Company had a beginning inventory of 100 units of Prod.pdf
Crane Company had a beginning inventory of 100 units of Prod.pdf
 
Coursera learning python interacting with operating system .pdf
Coursera learning python interacting with operating system .pdfCoursera learning python interacting with operating system .pdf
Coursera learning python interacting with operating system .pdf
 
Crane Company manufactures pizza sauce through two productio.pdf
Crane Company manufactures pizza sauce through two productio.pdfCrane Company manufactures pizza sauce through two productio.pdf
Crane Company manufactures pizza sauce through two productio.pdf
 
CPP Introduction types of benefits eligibility of benefit.pdf
CPP Introduction types of benefits eligibility of benefit.pdfCPP Introduction types of benefits eligibility of benefit.pdf
CPP Introduction types of benefits eligibility of benefit.pdf
 
COVID19 is going to change the way fast food restaurants pr.pdf
COVID19 is going to change the way fast food restaurants pr.pdfCOVID19 is going to change the way fast food restaurants pr.pdf
COVID19 is going to change the way fast food restaurants pr.pdf
 
Course Organization Modeling for DT 11 The Ecosystem map .pdf
Course Organization Modeling for DT 11 The Ecosystem map .pdfCourse Organization Modeling for DT 11 The Ecosystem map .pdf
Course Organization Modeling for DT 11 The Ecosystem map .pdf
 
cowan Company currently pays a 300 dividend The Board has.pdf
cowan Company currently pays a 300 dividend The Board has.pdfcowan Company currently pays a 300 dividend The Board has.pdf
cowan Company currently pays a 300 dividend The Board has.pdf
 
country is Ethiopia Use the UNCTAD STAT Country Profile site.pdf
country is Ethiopia Use the UNCTAD STAT Country Profile site.pdfcountry is Ethiopia Use the UNCTAD STAT Country Profile site.pdf
country is Ethiopia Use the UNCTAD STAT Country Profile site.pdf
 
Course Participation Strategies to Compete in the Markets .pdf
Course Participation  Strategies to Compete in the Markets .pdfCourse Participation  Strategies to Compete in the Markets .pdf
Course Participation Strategies to Compete in the Markets .pdf
 
Course ELECTRONIC HEALTH RECORDS Feild of Study INFORMATI.pdf
Course ELECTRONIC HEALTH RECORDS Feild of Study INFORMATI.pdfCourse ELECTRONIC HEALTH RECORDS Feild of Study INFORMATI.pdf
Course ELECTRONIC HEALTH RECORDS Feild of Study INFORMATI.pdf
 
Courts stick to objective reasonable person standards when.pdf
Courts stick to objective reasonable person standards when.pdfCourts stick to objective reasonable person standards when.pdf
Courts stick to objective reasonable person standards when.pdf
 
Course Name Healing 3 Lab Activity 6 Activity Title Dealin.pdf
Course Name Healing 3 Lab Activity  6 Activity Title Dealin.pdfCourse Name Healing 3 Lab Activity  6 Activity Title Dealin.pdf
Course Name Healing 3 Lab Activity 6 Activity Title Dealin.pdf
 
Country Ethiopia Currency Chapter 7 What is the current.pdf
Country Ethiopia Currency Chapter 7   What is the current.pdfCountry Ethiopia Currency Chapter 7   What is the current.pdf
Country Ethiopia Currency Chapter 7 What is the current.pdf
 
Count the number of zeros in a BYTE located at memory locati.pdf
Count the number of zeros in a BYTE located at memory locati.pdfCount the number of zeros in a BYTE located at memory locati.pdf
Count the number of zeros in a BYTE located at memory locati.pdf
 
Country analysis Ethiopia Trade chapter 5 How does the.pdf
Country analysis Ethiopia  Trade chapter 5  How does the.pdfCountry analysis Ethiopia  Trade chapter 5  How does the.pdf
Country analysis Ethiopia Trade chapter 5 How does the.pdf
 
could you please help me with this question just simple info.pdf
could you please help me with this question just simple info.pdfcould you please help me with this question just simple info.pdf
could you please help me with this question just simple info.pdf
 
Could you take a look at this Python code Towards the botto.pdf
Could you take a look at this Python code Towards the botto.pdfCould you take a look at this Python code Towards the botto.pdf
Could you take a look at this Python code Towards the botto.pdf
 
Could someone help with this code include Armourh .pdf
Could someone help with this code include Armourh   .pdfCould someone help with this code include Armourh   .pdf
Could someone help with this code include Armourh .pdf
 

Recently uploaded

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Recently uploaded (20)

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Convert the following if elseif statement into a switch st.pdf

  • 1. Convert the following if -else-if statement into a switch statement: if (choice =1) { System.out,print ln( "You selected 1." "); } else if (choice =21 choice =3){ System.out.print ln( "You selected 2 or 3." ); else if (choice ==4 ) { System.out.println("You selected 4." ); } else { System.out.println("Select again please."); } 11. Match the conditional expression with the if -else statement that performs the same operation. a. q=x<y?a+b:x2; b. q=x<y?x2:a+b; c. q=x<y?0:1;