SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
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"); }

Contenu connexe

Similaire à String Comparison Program Fixes Errors

data.txtInternational Business Management l2 Cons.docx
data.txtInternational Business Management       l2        Cons.docxdata.txtInternational Business Management       l2        Cons.docx
data.txtInternational Business Management l2 Cons.docxtheodorelove43763
 
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
import java.util.Scanner;Henry Cutler ID 1234  7202.docximport java.util.Scanner;Henry Cutler ID 1234  7202.docx
import java.util.Scanner;Henry Cutler ID 1234 7202.docxwilcockiris
 
Description 1) Create a Lab2 folder for this project2.docx
Description       1)  Create a Lab2 folder for this project2.docxDescription       1)  Create a Lab2 folder for this project2.docx
Description 1) Create a Lab2 folder for this project2.docxtheodorelove43763
 
Core 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/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
 
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdfTask #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdfinfo706022
 
Unitii classnotes
Unitii classnotesUnitii classnotes
Unitii classnotesSowri Rajan
 
(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_i(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_iNico Ludwig
 
R Programming: Importing Data In R
R Programming: Importing Data In RR Programming: Importing Data In R
R Programming: Importing Data In RRsquared Academy
 
cs348-06-lab3.doc
cs348-06-lab3.doccs348-06-lab3.doc
cs348-06-lab3.docbutest
 
cs348-06-lab3.doc
cs348-06-lab3.doccs348-06-lab3.doc
cs348-06-lab3.docbutest
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxmonicafrancis71118
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationMohammed Farrag
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxcargillfilberto
 

Similaire à String Comparison Program Fixes Errors (18)

data.txtInternational Business Management l2 Cons.docx
data.txtInternational Business Management       l2        Cons.docxdata.txtInternational Business Management       l2        Cons.docx
data.txtInternational Business Management l2 Cons.docx
 
Structures-2
Structures-2Structures-2
Structures-2
 
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
import java.util.Scanner;Henry Cutler ID 1234  7202.docximport java.util.Scanner;Henry Cutler ID 1234  7202.docx
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
 
Description 1) Create a Lab2 folder for this project2.docx
Description       1)  Create a Lab2 folder for this project2.docxDescription       1)  Create a Lab2 folder for this project2.docx
Description 1) Create a Lab2 folder for this project2.docx
 
Core 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/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
 
Java 3 Computer Science.pptx
Java 3 Computer Science.pptxJava 3 Computer Science.pptx
Java 3 Computer Science.pptx
 
IO and threads Java
IO and threads JavaIO and threads Java
IO and threads Java
 
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdfTask #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
 
Java execise
Java execiseJava execise
Java execise
 
Unitii classnotes
Unitii classnotesUnitii classnotes
Unitii classnotes
 
SWE-6 TESTING.pptx
SWE-6 TESTING.pptxSWE-6 TESTING.pptx
SWE-6 TESTING.pptx
 
(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_i(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_i
 
R Programming: Importing Data In R
R Programming: Importing Data In RR Programming: Importing Data In R
R Programming: Importing Data In R
 
cs348-06-lab3.doc
cs348-06-lab3.doccs348-06-lab3.doc
cs348-06-lab3.doc
 
cs348-06-lab3.doc
cs348-06-lab3.doccs348-06-lab3.doc
cs348-06-lab3.doc
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
 

Plus de ameancal

Introduction You will use your datasets for your project in your Unit.pdf
 Introduction You will use your datasets for your project in your Unit.pdf Introduction You will use your datasets for your project in your Unit.pdf
Introduction You will use your datasets for your project in your Unit.pdfameancal
 
Inventory Costing Methods Belden started the year with 4,500 units of.pdf
 Inventory Costing Methods Belden started the year with 4,500 units of.pdf Inventory Costing Methods Belden started the year with 4,500 units of.pdf
Inventory Costing Methods Belden started the year with 4,500 units of.pdfameancal
 
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
INTRODUCTION The goal of this programming project is to entble studen.pdfameancal
 
INTRODUCTION One of the most useful and powerful plots in astrophysic.pdf
 INTRODUCTION One of the most useful and powerful plots in astrophysic.pdf INTRODUCTION One of the most useful and powerful plots in astrophysic.pdf
INTRODUCTION One of the most useful and powerful plots in astrophysic.pdfameancal
 
Introduction and early history (Lectures 01 - 02) - what is animal be.pdf
 Introduction and early history (Lectures 01 - 02) - what is animal be.pdf Introduction and early history (Lectures 01 - 02) - what is animal be.pdf
Introduction and early history (Lectures 01 - 02) - what is animal be.pdfameancal
 
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
Intipententary Integamitaty Sydem Review inl iodentind amicher flento.pdfameancal
 
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
Internet Browsers Recently, the top web browser had 51.74 of the m.pdfameancal
 
International Trade Closing Cases and Discussions 1. Tadoos Sales to.pdf
 International Trade Closing Cases and Discussions 1. Tadoos Sales to.pdf International Trade Closing Cases and Discussions 1. Tadoos Sales to.pdf
International Trade Closing Cases and Discussions 1. Tadoos Sales to.pdfameancal
 
Interest rates or discount rafes. Fill in the interest rates for the .pdf
 Interest rates or discount rafes. Fill in the interest rates for the .pdf Interest rates or discount rafes. Fill in the interest rates for the .pdf
Interest rates or discount rafes. Fill in the interest rates for the .pdfameancal
 
Internal failure costs tend to be much lower for service organization.pdf
 Internal failure costs tend to be much lower for service organization.pdf Internal failure costs tend to be much lower for service organization.pdf
Internal failure costs tend to be much lower for service organization.pdfameancal
 
Instructions Answer ALL questions in this section. CASE STUDY Peter .pdf
 Instructions Answer ALL questions in this section. CASE STUDY Peter .pdf Instructions Answer ALL questions in this section. CASE STUDY Peter .pdf
Instructions Answer ALL questions in this section. CASE STUDY Peter .pdfameancal
 
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
Instructions (a) Prepare a cost of goods manufactured schedule for Ju.pdfameancal
 
Instructions Complete the following excrcises. No noed to show your .pdf
 Instructions Complete the following excrcises. No noed to show your .pdf Instructions Complete the following excrcises. No noed to show your .pdf
Instructions Complete the following excrcises. No noed to show your .pdfameancal
 
Instructions Answer ALL questions from this section CASE STUDY Cynt.pdf
 Instructions Answer ALL questions from this section CASE STUDY Cynt.pdf Instructions Answer ALL questions from this section CASE STUDY Cynt.pdf
Instructions Answer ALL questions from this section CASE STUDY Cynt.pdfameancal
 
Instructions - In Course 3 - Project Planning Putting it all togethe.pdf
 Instructions - In Course 3 - Project Planning Putting it all togethe.pdf Instructions - In Course 3 - Project Planning Putting it all togethe.pdf
Instructions - In Course 3 - Project Planning Putting it all togethe.pdfameancal
 
Instructions shares should receive under each of the following cond.pdf
 Instructions shares should receive under each of the following cond.pdf Instructions shares should receive under each of the following cond.pdf
Instructions shares should receive under each of the following cond.pdfameancal
 
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
Inseructons Propane the Mery 11th� journat entry for Cody Compary.pdfameancal
 
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
inite anedt the keneth of time Alutrasweet cojoyicd its firt inover a.pdfameancal
 
Instructions C=200+0.75YI=150.pdf
 Instructions C=200+0.75YI=150.pdf Instructions C=200+0.75YI=150.pdf
Instructions C=200+0.75YI=150.pdfameancal
 
Instructions Submit an electronic copy of the assignment to the Drop.pdf
 Instructions Submit an electronic copy of the assignment to the Drop.pdf Instructions Submit an electronic copy of the assignment to the Drop.pdf
Instructions Submit an electronic copy of the assignment to the Drop.pdfameancal
 

Plus de ameancal (20)

Introduction You will use your datasets for your project in your Unit.pdf
 Introduction You will use your datasets for your project in your Unit.pdf Introduction You will use your datasets for your project in your Unit.pdf
Introduction You will use your datasets for your project in your Unit.pdf
 
Inventory Costing Methods Belden started the year with 4,500 units of.pdf
 Inventory Costing Methods Belden started the year with 4,500 units of.pdf Inventory Costing Methods Belden started the year with 4,500 units of.pdf
Inventory Costing Methods Belden started the year with 4,500 units of.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 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 One of the most useful and powerful plots in astrophysic.pdf
 INTRODUCTION One of the most useful and powerful plots in astrophysic.pdf INTRODUCTION One of the most useful and powerful plots in astrophysic.pdf
INTRODUCTION One of the most useful and powerful plots in astrophysic.pdf
 
Introduction and early history (Lectures 01 - 02) - what is animal be.pdf
 Introduction and early history (Lectures 01 - 02) - what is animal be.pdf Introduction and early history (Lectures 01 - 02) - what is animal be.pdf
Introduction and early history (Lectures 01 - 02) - what is animal be.pdf
 
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
Intipententary Integamitaty Sydem Review inl iodentind amicher flento.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 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
 
International Trade Closing Cases and Discussions 1. Tadoos Sales to.pdf
 International Trade Closing Cases and Discussions 1. Tadoos Sales to.pdf International Trade Closing Cases and Discussions 1. Tadoos Sales to.pdf
International Trade Closing Cases and Discussions 1. Tadoos Sales to.pdf
 
Interest rates or discount rafes. Fill in the interest rates for the .pdf
 Interest rates or discount rafes. Fill in the interest rates for the .pdf Interest rates or discount rafes. Fill in the interest rates for the .pdf
Interest rates or discount rafes. Fill in the interest rates for the .pdf
 
Internal failure costs tend to be much lower for service organization.pdf
 Internal failure costs tend to be much lower for service organization.pdf Internal failure costs tend to be much lower for service organization.pdf
Internal failure costs tend to be much lower for service organization.pdf
 
Instructions Answer ALL questions in this section. CASE STUDY Peter .pdf
 Instructions Answer ALL questions in this section. CASE STUDY Peter .pdf Instructions Answer ALL questions in this section. CASE STUDY Peter .pdf
Instructions Answer ALL questions in this section. CASE STUDY Peter .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 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 Complete the following excrcises. No noed to show your .pdf
 Instructions Complete the following excrcises. No noed to show your .pdf Instructions Complete the following excrcises. No noed to show your .pdf
Instructions Complete the following excrcises. No noed to show your .pdf
 
Instructions Answer ALL questions from this section CASE STUDY Cynt.pdf
 Instructions Answer ALL questions from this section CASE STUDY Cynt.pdf Instructions Answer ALL questions from this section CASE STUDY Cynt.pdf
Instructions Answer ALL questions from this section CASE STUDY Cynt.pdf
 
Instructions - In Course 3 - Project Planning Putting it all togethe.pdf
 Instructions - In Course 3 - Project Planning Putting it all togethe.pdf Instructions - In Course 3 - Project Planning Putting it all togethe.pdf
Instructions - In Course 3 - Project Planning Putting it all togethe.pdf
 
Instructions shares should receive under each of the following cond.pdf
 Instructions shares should receive under each of the following cond.pdf Instructions shares should receive under each of the following cond.pdf
Instructions shares should receive under each of the following cond.pdf
 
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
Inseructons Propane the Mery 11th� journat entry for Cody Compary.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 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
 
Instructions C=200+0.75YI=150.pdf
 Instructions C=200+0.75YI=150.pdf Instructions C=200+0.75YI=150.pdf
Instructions C=200+0.75YI=150.pdf
 
Instructions Submit an electronic copy of the assignment to the Drop.pdf
 Instructions Submit an electronic copy of the assignment to the Drop.pdf Instructions Submit an electronic copy of the assignment to the Drop.pdf
Instructions Submit an electronic copy of the assignment to the Drop.pdf
 

Dernier

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
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 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
 
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
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
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
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
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
 
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
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Dernier (20)

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
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 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
 
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...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
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
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
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
 
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
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

String Comparison Program Fixes Errors

  • 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"); }