Instructions Makes String comparisons The files provided in the co.pdf

A

Instructions // Makes String comparisons The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix 4{{ the problem, remove all syntax and coding errors, and run 5 public static void main(String[] args) the program to ensure it works properly. Scanner kb= new Scanner(System.in); An example of the program is shown below: String name1, name2, name3; System.out.println("Enter three names."); System.out.println("They can be the same or different."); System.out.print("First name >> "); name1 =kb nextLine; System.out.print("Second name >> "); name2 =kb nextLine; System.out.print("Third name >> "); name3 = kb.nextLine; compareNames (name1, name2); compareNames (name1, name3); compareNames (name2, name3); \} public static void comparNames (String n1,n2 ) \{ System.out.print (n1+" and "+n2); if (n1.equals (n2) System.out.println(" are the same"); else System.out.println(" are different"); \}.

Instructions // Makes String comparisons The files provided in the code editor to the right
contain syntax and/or logic errors. In each case, determine and fix 4{{ the problem, remove all
syntax and coding errors, and run 5 public static void main(String[] args) the program to ensure
it works properly. Scanner kb= new Scanner(System.in); An example of the program is shown
below: String name1, name2, name3; System.out.println("Enter three names.");
System.out.println("They can be the same or different."); System.out.print("First name >> ");
name1 =kb nextLine; System.out.print("Second name >> "); name2 =kb nextLine;
System.out.print("Third name >> "); name3 = kb.nextLine; compareNames (name1, name2);
compareNames (name1, name3); compareNames (name2, name3); } public static void
comparNames (String n1,n2 ) { System.out.print (n1+" and "+n2); if (n1.equals (n2)
System.out.println(" are the same"); else System.out.println(" are different"); }

Recomendados

ExtraFileIO.pptx von
ExtraFileIO.pptxExtraFileIO.pptx
ExtraFileIO.pptxNguynThiThanhTho
1 view32 Folien
ch06-file-processing.ppt von
ch06-file-processing.pptch06-file-processing.ppt
ch06-file-processing.pptMahyuddin8
15 views41 Folien
Review Questions for Exam 10182016 1. public class .pdf von
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfmayorothenguyenhob69
5 views13 Folien
Symbol Table Implementation Problem Description You are to develop a .pdf von
Symbol Table Implementation Problem Description You are to develop a .pdfSymbol Table Implementation Problem Description You are to develop a .pdf
Symbol Table Implementation Problem Description You are to develop a .pdfarvindarora20042013
2 views2 Folien
COMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docx von
COMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docxCOMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docx
COMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docxdonnajames55
5 views13 Folien
Chapter 2.4 von
Chapter 2.4Chapter 2.4
Chapter 2.4sotlsoc
472 views24 Folien

Más contenido relacionado

Similar a Instructions Makes String comparisons The files provided in the co.pdf

Structures-2 von
Structures-2Structures-2
Structures-2arshpreetkaur07
142 views30 Folien
Can you pinpoint what is wrong with this codeplease explain thank y.pdf von
Can you pinpoint what is wrong with this codeplease explain thank y.pdfCan you pinpoint what is wrong with this codeplease explain thank y.pdf
Can you pinpoint what is wrong with this codeplease explain thank y.pdfezycolours78
2 views1 Folie
please I need help with this code (( Introduction The goal of th.pdf von
please I need help with this code (( Introduction The goal of th.pdfplease I need help with this code (( Introduction The goal of th.pdf
please I need help with this code (( Introduction The goal of th.pdfrmwaterlife
2 views4 Folien
Two Meanings of PlusIn Java, the symbol + can be used to add numbe.pdf von
Two Meanings of PlusIn Java, the symbol + can be used to add numbe.pdfTwo Meanings of PlusIn Java, the symbol + can be used to add numbe.pdf
Two Meanings of PlusIn Java, the symbol + can be used to add numbe.pdffathimafancy
2 views2 Folien
#write java programWrite a method called evenNumbers that accepts .docx von
#write java programWrite a method called evenNumbers that accepts .docx#write java programWrite a method called evenNumbers that accepts .docx
#write java programWrite a method called evenNumbers that accepts .docxajoy21
2 views4 Folien
Core Java Programming Language (JSE) : Chapter XI - Console I/O and File I/O von
Core Java Programming Language (JSE) : Chapter XI - Console I/O and File I/OCore Java Programming Language (JSE) : Chapter XI - Console I/O and File I/O
Core Java Programming Language (JSE) : Chapter XI - Console I/O and File I/OWebStackAcademy
56 views22 Folien

Similar a Instructions Makes String comparisons The files provided in the co.pdf(20)

Can you pinpoint what is wrong with this codeplease explain thank y.pdf von ezycolours78
Can you pinpoint what is wrong with this codeplease explain thank y.pdfCan you pinpoint what is wrong with this codeplease explain thank y.pdf
Can you pinpoint what is wrong with this codeplease explain thank y.pdf
ezycolours782 views
please I need help with this code (( Introduction The goal of th.pdf von rmwaterlife
please I need help with this code (( Introduction The goal of th.pdfplease I need help with this code (( Introduction The goal of th.pdf
please I need help with this code (( Introduction The goal of th.pdf
rmwaterlife2 views
Two Meanings of PlusIn Java, the symbol + can be used to add numbe.pdf von fathimafancy
Two Meanings of PlusIn Java, the symbol + can be used to add numbe.pdfTwo Meanings of PlusIn Java, the symbol + can be used to add numbe.pdf
Two Meanings of PlusIn Java, the symbol + can be used to add numbe.pdf
fathimafancy2 views
#write java programWrite a method called evenNumbers that accepts .docx von ajoy21
#write java programWrite a method called evenNumbers that accepts .docx#write java programWrite a method called evenNumbers that accepts .docx
#write java programWrite a method called evenNumbers that accepts .docx
ajoy212 views
Core Java Programming Language (JSE) : Chapter XI - Console I/O and File I/O von WebStackAcademy
Core Java Programming Language (JSE) : Chapter XI - Console I/O and File I/OCore Java Programming Language (JSE) : Chapter XI - Console I/O and File I/O
Core Java Programming Language (JSE) : Chapter XI - Console I/O and File I/O
WebStackAcademy56 views
Upload Chapter6.java with a main method similar to below Write a pu.docx von Komlin1
 Upload Chapter6.java with a main method similar to below  Write a pu.docx Upload Chapter6.java with a main method similar to below  Write a pu.docx
Upload Chapter6.java with a main method similar to below Write a pu.docx
Komlin14 views
Write a 1 or 2sentence problem statement that you can solve iterativel.docx von SUKHI5
Write a 1 or 2sentence problem statement that you can solve iterativel.docxWrite a 1 or 2sentence problem statement that you can solve iterativel.docx
Write a 1 or 2sentence problem statement that you can solve iterativel.docx
SUKHI52 views
8-7- Modify exercise 7-2 on comparing strings so it is now done in a G.pdf von JohnKyQMorrisont
8-7- Modify exercise 7-2 on comparing strings so it is now done in a G.pdf8-7- Modify exercise 7-2 on comparing strings so it is now done in a G.pdf
8-7- Modify exercise 7-2 on comparing strings so it is now done in a G.pdf
Write a program that displays a square of characters whose side is sp.docx von ajoy21
 Write a program that displays a square of characters whose side is sp.docx Write a program that displays a square of characters whose side is sp.docx
Write a program that displays a square of characters whose side is sp.docx
ajoy212 views
Write a program that displays a square of characters whose side is spe.docx von noreendchesterton753
Write a program that displays a square of characters whose side is spe.docxWrite a program that displays a square of characters whose side is spe.docx
Write a program that displays a square of characters whose side is spe.docx
(2) c sharp introduction_basics_part_i von Nico Ludwig
(2) c sharp introduction_basics_part_i(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_i
Nico Ludwig255 views
cs348-06-lab3.doc von butest
cs348-06-lab3.doccs348-06-lab3.doc
cs348-06-lab3.doc
butest158 views
cs348-06-lab3.doc von butest
cs348-06-lab3.doccs348-06-lab3.doc
cs348-06-lab3.doc
butest263 views

Más de ameancal

Inventory Costing LFO Filimonov Inc. has the following information r.pdf von
 Inventory Costing LFO Filimonov Inc. has the following information r.pdf Inventory Costing LFO Filimonov Inc. has the following information r.pdf
Inventory Costing LFO Filimonov Inc. has the following information r.pdfameancal
6 views1 Folie
Inventory Costing Methods-Periodic System Following is an inventory a.pdf von
 Inventory Costing Methods-Periodic System Following is an inventory a.pdf Inventory Costing Methods-Periodic System Following is an inventory a.pdf
Inventory Costing Methods-Periodic System Following is an inventory a.pdfameancal
4 views1 Folie
Integrative-Multiple leverage messures Play-More Toys produces inftat.pdf von
 Integrative-Multiple leverage messures Play-More Toys produces inftat.pdf Integrative-Multiple leverage messures Play-More Toys produces inftat.pdf
Integrative-Multiple leverage messures Play-More Toys produces inftat.pdfameancal
2 views1 Folie
Introduction The more preparation you put into the design of your dat.pdf von
 Introduction The more preparation you put into the design of your dat.pdf Introduction The more preparation you put into the design of your dat.pdf
Introduction The more preparation you put into the design of your dat.pdfameancal
2 views1 Folie
InteliSystems manufactures an optical switch that it uses in its fina.pdf von
 InteliSystems manufactures an optical switch that it uses in its fina.pdf InteliSystems manufactures an optical switch that it uses in its fina.pdf
InteliSystems manufactures an optical switch that it uses in its fina.pdfameancal
9 views1 Folie
INTRODUCTION The goal of this programming project is to entble studen.pdf von
 INTRODUCTION The goal of this programming project is to entble studen.pdf INTRODUCTION The goal of this programming project is to entble studen.pdf
INTRODUCTION The goal of this programming project is to entble studen.pdfameancal
3 views7 Folien

Más de ameancal(20)

Inventory Costing LFO Filimonov Inc. has the following information r.pdf von ameancal
 Inventory Costing LFO Filimonov Inc. has the following information r.pdf Inventory Costing LFO Filimonov Inc. has the following information r.pdf
Inventory Costing LFO Filimonov Inc. has the following information r.pdf
ameancal6 views
Inventory Costing Methods-Periodic System Following is an inventory a.pdf von ameancal
 Inventory Costing Methods-Periodic System Following is an inventory a.pdf Inventory Costing Methods-Periodic System Following is an inventory a.pdf
Inventory Costing Methods-Periodic System Following is an inventory a.pdf
ameancal4 views
Integrative-Multiple leverage messures Play-More Toys produces inftat.pdf von ameancal
 Integrative-Multiple leverage messures Play-More Toys produces inftat.pdf Integrative-Multiple leverage messures Play-More Toys produces inftat.pdf
Integrative-Multiple leverage messures Play-More Toys produces inftat.pdf
ameancal2 views
Introduction The more preparation you put into the design of your dat.pdf von ameancal
 Introduction The more preparation you put into the design of your dat.pdf Introduction The more preparation you put into the design of your dat.pdf
Introduction The more preparation you put into the design of your dat.pdf
ameancal2 views
InteliSystems manufactures an optical switch that it uses in its fina.pdf von ameancal
 InteliSystems manufactures an optical switch that it uses in its fina.pdf InteliSystems manufactures an optical switch that it uses in its fina.pdf
InteliSystems manufactures an optical switch that it uses in its fina.pdf
ameancal9 views
INTRODUCTION The goal of this programming project is to entble studen.pdf von ameancal
 INTRODUCTION The goal of this programming project is to entble studen.pdf INTRODUCTION The goal of this programming project is to entble studen.pdf
INTRODUCTION The goal of this programming project is to entble studen.pdf
ameancal3 views
interval estimate of the mean skull width. mmmm (Round to two decim.pdf von ameancal
 interval estimate of the mean skull width. mmmm (Round to two decim.pdf interval estimate of the mean skull width. mmmm (Round to two decim.pdf
interval estimate of the mean skull width. mmmm (Round to two decim.pdf
ameancal2 views
Intipententary Integamitaty Sydem Review inl iodentind amicher flento.pdf von ameancal
 Intipententary Integamitaty Sydem Review inl iodentind amicher flento.pdf Intipententary Integamitaty Sydem Review inl iodentind amicher flento.pdf
Intipententary Integamitaty Sydem Review inl iodentind amicher flento.pdf
ameancal5 views
Internet Browsers Recently, the top web browser had 51.74 of the m.pdf von ameancal
 Internet Browsers Recently, the top web browser had 51.74 of the m.pdf Internet Browsers Recently, the top web browser had 51.74 of the m.pdf
Internet Browsers Recently, the top web browser had 51.74 of the m.pdf
ameancal12 views
Internet Browsers Recently, the top web browser had 51.74 of the mar.pdf von ameancal
 Internet Browsers Recently, the top web browser had 51.74 of the mar.pdf Internet Browsers Recently, the top web browser had 51.74 of the mar.pdf
Internet Browsers Recently, the top web browser had 51.74 of the mar.pdf
ameancal3 views
Internal Insights inc. a developer of radiology equipment, has stock .pdf von ameancal
 Internal Insights inc. a developer of radiology equipment, has stock .pdf Internal Insights inc. a developer of radiology equipment, has stock .pdf
Internal Insights inc. a developer of radiology equipment, has stock .pdf
ameancal2 views
Instructions Using MS Word, or any text editor, write the Pseudo-cod.pdf von ameancal
 Instructions Using MS Word, or any text editor, write the Pseudo-cod.pdf Instructions Using MS Word, or any text editor, write the Pseudo-cod.pdf
Instructions Using MS Word, or any text editor, write the Pseudo-cod.pdf
ameancal2 views
Instructions (a) Prepare a cost of goods manufactured schedule for Ju.pdf von ameancal
 Instructions (a) Prepare a cost of goods manufactured schedule for Ju.pdf Instructions (a) Prepare a cost of goods manufactured schedule for Ju.pdf
Instructions (a) Prepare a cost of goods manufactured schedule for Ju.pdf
ameancal2 views
Instructions Identify an existing organisation in an industry of.pdf von ameancal
 Instructions Identify an existing organisation in an industry of.pdf Instructions Identify an existing organisation in an industry of.pdf
Instructions Identify an existing organisation in an industry of.pdf
ameancal8 views
Instructions For each of the following items, Indicate the secti.pdf von ameancal
 Instructions For each of the following items, Indicate the secti.pdf Instructions For each of the following items, Indicate the secti.pdf
Instructions For each of the following items, Indicate the secti.pdf
ameancal2 views
Instructions TO RECEIVE CREDIT FOR THE ITEMS BELOW YOU MUST SHOW YOUR.pdf von ameancal
 Instructions TO RECEIVE CREDIT FOR THE ITEMS BELOW YOU MUST SHOW YOUR.pdf Instructions TO RECEIVE CREDIT FOR THE ITEMS BELOW YOU MUST SHOW YOUR.pdf
Instructions TO RECEIVE CREDIT FOR THE ITEMS BELOW YOU MUST SHOW YOUR.pdf
ameancal2 views
Instrucciones Para recibir cr�dito completo, debe hacer una selecc.pdf von ameancal
 Instrucciones Para recibir cr�dito completo, debe hacer una selecc.pdf Instrucciones Para recibir cr�dito completo, debe hacer una selecc.pdf
Instrucciones Para recibir cr�dito completo, debe hacer una selecc.pdf
ameancal2 views
Inseructons Propane the Mery 11th� journat entry for Cody Compary.pdf von ameancal
 Inseructons Propane the Mery 11th� journat entry for Cody Compary.pdf Inseructons Propane the Mery 11th� journat entry for Cody Compary.pdf
Inseructons Propane the Mery 11th� journat entry for Cody Compary.pdf
ameancal2 views
Instant Brake inc.s comparative balance sheet information at Decembe.pdf von ameancal
 Instant Brake inc.s comparative balance sheet information at Decembe.pdf Instant Brake inc.s comparative balance sheet information at Decembe.pdf
Instant Brake inc.s comparative balance sheet information at Decembe.pdf
ameancal5 views
inite anedt the keneth of time Alutrasweet cojoyicd its firt inover a.pdf von ameancal
 inite anedt the keneth of time Alutrasweet cojoyicd its firt inover a.pdf inite anedt the keneth of time Alutrasweet cojoyicd its firt inover a.pdf
inite anedt the keneth of time Alutrasweet cojoyicd its firt inover a.pdf
ameancal2 views

Último

The Future of Micro-credentials: Is Small Really Beautiful? von
The Future of Micro-credentials:  Is Small Really Beautiful?The Future of Micro-credentials:  Is Small Really Beautiful?
The Future of Micro-credentials: Is Small Really Beautiful?Mark Brown
121 views35 Folien
STRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdf von
STRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdfSTRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdf
STRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdfDr Vijay Vishwakarma
136 views68 Folien
Meet the Bible von
Meet the BibleMeet the Bible
Meet the BibleSteve Thomason
83 views80 Folien
Guess Papers ADC 1, Karachi University von
Guess Papers ADC 1, Karachi UniversityGuess Papers ADC 1, Karachi University
Guess Papers ADC 1, Karachi UniversityKhalid Aziz
109 views17 Folien
A Guide to Applying for the Wells Mountain Initiative Scholarship 2023 von
A Guide to Applying for the Wells Mountain Initiative Scholarship 2023A Guide to Applying for the Wells Mountain Initiative Scholarship 2023
A Guide to Applying for the Wells Mountain Initiative Scholarship 2023Excellence Foundation for South Sudan
89 views26 Folien
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption... von
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...BC Chew
40 views47 Folien

Último(20)

The Future of Micro-credentials: Is Small Really Beautiful? von Mark Brown
The Future of Micro-credentials:  Is Small Really Beautiful?The Future of Micro-credentials:  Is Small Really Beautiful?
The Future of Micro-credentials: Is Small Really Beautiful?
Mark Brown121 views
Guess Papers ADC 1, Karachi University von Khalid Aziz
Guess Papers ADC 1, Karachi UniversityGuess Papers ADC 1, Karachi University
Guess Papers ADC 1, Karachi University
Khalid Aziz109 views
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption... von BC Chew
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...
BC Chew40 views
JRN 362 - Lecture Twenty-Two von Rich Hanley
JRN 362 - Lecture Twenty-TwoJRN 362 - Lecture Twenty-Two
JRN 362 - Lecture Twenty-Two
Rich Hanley39 views
Guidelines & Identification of Early Sepsis DR. NN CHAVAN 02122023.pptx von Niranjan Chavan
Guidelines & Identification of Early Sepsis DR. NN CHAVAN 02122023.pptxGuidelines & Identification of Early Sepsis DR. NN CHAVAN 02122023.pptx
Guidelines & Identification of Early Sepsis DR. NN CHAVAN 02122023.pptx
Niranjan Chavan43 views
NodeJS and ExpressJS.pdf von ArthyR3
NodeJS and ExpressJS.pdfNodeJS and ExpressJS.pdf
NodeJS and ExpressJS.pdf
ArthyR353 views
JRN 362 - Lecture Twenty-Three (Epilogue) von Rich Hanley
JRN 362 - Lecture Twenty-Three (Epilogue)JRN 362 - Lecture Twenty-Three (Epilogue)
JRN 362 - Lecture Twenty-Three (Epilogue)
Rich Hanley44 views
Education of marginalized and socially disadvantages segments.pptx von GarimaBhati5
Education of marginalized and socially disadvantages segments.pptxEducation of marginalized and socially disadvantages segments.pptx
Education of marginalized and socially disadvantages segments.pptx
GarimaBhati552 views
Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab... von RAHUL PAL
Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab...Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab...
Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab...
RAHUL PAL45 views
Peripheral artery diseases by Dr. Garvit.pptx von garvitnanecha
Peripheral artery diseases by Dr. Garvit.pptxPeripheral artery diseases by Dr. Garvit.pptx
Peripheral artery diseases by Dr. Garvit.pptx
garvitnanecha135 views
JQUERY.pdf von ArthyR3
JQUERY.pdfJQUERY.pdf
JQUERY.pdf
ArthyR3114 views
ANGULARJS.pdf von ArthyR3
ANGULARJS.pdfANGULARJS.pdf
ANGULARJS.pdf
ArthyR354 views
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE... von Nguyen Thanh Tu Collection
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...

Instructions Makes String comparisons The files provided in the co.pdf

  • 1. Instructions // Makes String comparisons The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix 4{{ the problem, remove all syntax and coding errors, and run 5 public static void main(String[] args) the program to ensure it works properly. Scanner kb= new Scanner(System.in); An example of the program is shown below: String name1, name2, name3; System.out.println("Enter three names."); System.out.println("They can be the same or different."); System.out.print("First name >> "); name1 =kb nextLine; System.out.print("Second name >> "); name2 =kb nextLine; System.out.print("Third name >> "); name3 = kb.nextLine; compareNames (name1, name2); compareNames (name1, name3); compareNames (name2, name3); } public static void comparNames (String n1,n2 ) { System.out.print (n1+" and "+n2); if (n1.equals (n2) System.out.println(" are the same"); else System.out.println(" are different"); }