SlideShare a Scribd company logo
1 of 1
Download to read offline
Hi Please find necessary code:
// creating Pair Object
Pair pair = new Pair();
// Lets assume that there are two variables names as : first and second
// Then code to set String in both
pair.setFirst("First");
pair.setSecond("Second");
// getting both object and printing
System.out.println(pair.getFirst());
System.out.println(pair.getSecond());
Solution
Hi Please find necessary code:
// creating Pair Object
Pair pair = new Pair();
// Lets assume that there are two variables names as : first and second
// Then code to set String in both
pair.setFirst("First");
pair.setSecond("Second");
// getting both object and printing
System.out.println(pair.getFirst());
System.out.println(pair.getSecond());

More Related Content

More from nipuns1983

SolutionThis encryption scheme is not considered to be a secure o.pdf
SolutionThis encryption scheme is not considered to be a secure o.pdfSolutionThis encryption scheme is not considered to be a secure o.pdf
SolutionThis encryption scheme is not considered to be a secure o.pdfnipuns1983
 
Smart Beta ia a rather elusive term in modern finance sometimes know.pdf
Smart Beta ia a rather elusive term in modern finance sometimes know.pdfSmart Beta ia a rather elusive term in modern finance sometimes know.pdf
Smart Beta ia a rather elusive term in modern finance sometimes know.pdfnipuns1983
 
Ques-1 What is the differential diagnosis of this patients infectin.pdf
Ques-1 What is the differential diagnosis of this patients infectin.pdfQues-1 What is the differential diagnosis of this patients infectin.pdf
Ques-1 What is the differential diagnosis of this patients infectin.pdfnipuns1983
 
package employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdfpackage employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdfnipuns1983
 
Option 1Project management software Project management software .pdf
Option 1Project management software Project management software .pdfOption 1Project management software Project management software .pdf
Option 1Project management software Project management software .pdfnipuns1983
 
import java.util.Scanner;public class InputIntegers{public sta.pdf
import java.util.Scanner;public class InputIntegers{public sta.pdfimport java.util.Scanner;public class InputIntegers{public sta.pdf
import java.util.Scanner;public class InputIntegers{public sta.pdfnipuns1983
 
The main drawback of Troutons rule is that it i.pdf
                     The main drawback of Troutons rule is that it i.pdf                     The main drawback of Troutons rule is that it i.pdf
The main drawback of Troutons rule is that it i.pdfnipuns1983
 
Solid to liquid, or liquid to gas change absorbs .pdf
                     Solid to liquid, or liquid to gas change absorbs .pdf                     Solid to liquid, or liquid to gas change absorbs .pdf
Solid to liquid, or liquid to gas change absorbs .pdfnipuns1983
 
RNase P catalyzes the Mg2+-dependent 5-maturati.pdf
                     RNase P catalyzes the Mg2+-dependent 5-maturati.pdf                     RNase P catalyzes the Mg2+-dependent 5-maturati.pdf
RNase P catalyzes the Mg2+-dependent 5-maturati.pdfnipuns1983
 
pH of a solution is directly proportional to mola.pdf
                     pH of a solution is directly proportional to mola.pdf                     pH of a solution is directly proportional to mola.pdf
pH of a solution is directly proportional to mola.pdfnipuns1983
 
Option - D is correct !! .pdf
                     Option - D is correct !!                         .pdf                     Option - D is correct !!                         .pdf
Option - D is correct !! .pdfnipuns1983
 
n = number present before orbital =3 l= 0 for s, .pdf
                     n = number present before orbital =3 l= 0 for s, .pdf                     n = number present before orbital =3 l= 0 for s, .pdf
n = number present before orbital =3 l= 0 for s, .pdfnipuns1983
 
nitro methane is a polar compound plus it has nit.pdf
                     nitro methane is a polar compound plus it has nit.pdf                     nitro methane is a polar compound plus it has nit.pdf
nitro methane is a polar compound plus it has nit.pdfnipuns1983
 
Molar solubility = moles of solute volume of so.pdf
                     Molar solubility = moles of solute  volume of so.pdf                     Molar solubility = moles of solute  volume of so.pdf
Molar solubility = moles of solute volume of so.pdfnipuns1983
 
ionic bonds .pdf
                     ionic bonds                                      .pdf                     ionic bonds                                      .pdf
ionic bonds .pdfnipuns1983
 
in the equation E=Eo-RTln(M) since u r getting -0.pdf
                     in the equation E=Eo-RTln(M) since u r getting -0.pdf                     in the equation E=Eo-RTln(M) since u r getting -0.pdf
in the equation E=Eo-RTln(M) since u r getting -0.pdfnipuns1983
 
Hückel Theory This theory was originally introduc.pdf
                     Hückel Theory This theory was originally introduc.pdf                     Hückel Theory This theory was originally introduc.pdf
Hückel Theory This theory was originally introduc.pdfnipuns1983
 
Experimenters had noticed that sparks travel thro.pdf
                     Experimenters had noticed that sparks travel thro.pdf                     Experimenters had noticed that sparks travel thro.pdf
Experimenters had noticed that sparks travel thro.pdfnipuns1983
 
Density = PMRT = 0.4168.314112 = 0.007 gml .pdf
                     Density = PMRT = 0.4168.314112 = 0.007 gml  .pdf                     Density = PMRT = 0.4168.314112 = 0.007 gml  .pdf
Density = PMRT = 0.4168.314112 = 0.007 gml .pdfnipuns1983
 

More from nipuns1983 (20)

SolutionThis encryption scheme is not considered to be a secure o.pdf
SolutionThis encryption scheme is not considered to be a secure o.pdfSolutionThis encryption scheme is not considered to be a secure o.pdf
SolutionThis encryption scheme is not considered to be a secure o.pdf
 
Smart Beta ia a rather elusive term in modern finance sometimes know.pdf
Smart Beta ia a rather elusive term in modern finance sometimes know.pdfSmart Beta ia a rather elusive term in modern finance sometimes know.pdf
Smart Beta ia a rather elusive term in modern finance sometimes know.pdf
 
Ques-1 What is the differential diagnosis of this patients infectin.pdf
Ques-1 What is the differential diagnosis of this patients infectin.pdfQues-1 What is the differential diagnosis of this patients infectin.pdf
Ques-1 What is the differential diagnosis of this patients infectin.pdf
 
package employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdfpackage employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdf
 
Option 1Project management software Project management software .pdf
Option 1Project management software Project management software .pdfOption 1Project management software Project management software .pdf
Option 1Project management software Project management software .pdf
 
import java.util.Scanner;public class InputIntegers{public sta.pdf
import java.util.Scanner;public class InputIntegers{public sta.pdfimport java.util.Scanner;public class InputIntegers{public sta.pdf
import java.util.Scanner;public class InputIntegers{public sta.pdf
 
The main drawback of Troutons rule is that it i.pdf
                     The main drawback of Troutons rule is that it i.pdf                     The main drawback of Troutons rule is that it i.pdf
The main drawback of Troutons rule is that it i.pdf
 
Solid to liquid, or liquid to gas change absorbs .pdf
                     Solid to liquid, or liquid to gas change absorbs .pdf                     Solid to liquid, or liquid to gas change absorbs .pdf
Solid to liquid, or liquid to gas change absorbs .pdf
 
RNase P catalyzes the Mg2+-dependent 5-maturati.pdf
                     RNase P catalyzes the Mg2+-dependent 5-maturati.pdf                     RNase P catalyzes the Mg2+-dependent 5-maturati.pdf
RNase P catalyzes the Mg2+-dependent 5-maturati.pdf
 
pH of a solution is directly proportional to mola.pdf
                     pH of a solution is directly proportional to mola.pdf                     pH of a solution is directly proportional to mola.pdf
pH of a solution is directly proportional to mola.pdf
 
Option - D is correct !! .pdf
                     Option - D is correct !!                         .pdf                     Option - D is correct !!                         .pdf
Option - D is correct !! .pdf
 
n = number present before orbital =3 l= 0 for s, .pdf
                     n = number present before orbital =3 l= 0 for s, .pdf                     n = number present before orbital =3 l= 0 for s, .pdf
n = number present before orbital =3 l= 0 for s, .pdf
 
nitro methane is a polar compound plus it has nit.pdf
                     nitro methane is a polar compound plus it has nit.pdf                     nitro methane is a polar compound plus it has nit.pdf
nitro methane is a polar compound plus it has nit.pdf
 
Molar solubility = moles of solute volume of so.pdf
                     Molar solubility = moles of solute  volume of so.pdf                     Molar solubility = moles of solute  volume of so.pdf
Molar solubility = moles of solute volume of so.pdf
 
ionic bonds .pdf
                     ionic bonds                                      .pdf                     ionic bonds                                      .pdf
ionic bonds .pdf
 
in the equation E=Eo-RTln(M) since u r getting -0.pdf
                     in the equation E=Eo-RTln(M) since u r getting -0.pdf                     in the equation E=Eo-RTln(M) since u r getting -0.pdf
in the equation E=Eo-RTln(M) since u r getting -0.pdf
 
Hückel Theory This theory was originally introduc.pdf
                     Hückel Theory This theory was originally introduc.pdf                     Hückel Theory This theory was originally introduc.pdf
Hückel Theory This theory was originally introduc.pdf
 
Experimenters had noticed that sparks travel thro.pdf
                     Experimenters had noticed that sparks travel thro.pdf                     Experimenters had noticed that sparks travel thro.pdf
Experimenters had noticed that sparks travel thro.pdf
 
Density = PMRT = 0.4168.314112 = 0.007 gml .pdf
                     Density = PMRT = 0.4168.314112 = 0.007 gml  .pdf                     Density = PMRT = 0.4168.314112 = 0.007 gml  .pdf
Density = PMRT = 0.4168.314112 = 0.007 gml .pdf
 
D.) Solu.pdf
                     D.)                                      Solu.pdf                     D.)                                      Solu.pdf
D.) Solu.pdf
 

Recently uploaded

e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital ManagementMBA Assignment Experts
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 

Recently uploaded (20)

e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 

Hi Please find necessary code creating Pair Object PairSt.pdf

  • 1. Hi Please find necessary code: // creating Pair Object Pair pair = new Pair(); // Lets assume that there are two variables names as : first and second // Then code to set String in both pair.setFirst("First"); pair.setSecond("Second"); // getting both object and printing System.out.println(pair.getFirst()); System.out.println(pair.getSecond()); Solution Hi Please find necessary code: // creating Pair Object Pair pair = new Pair(); // Lets assume that there are two variables names as : first and second // Then code to set String in both pair.setFirst("First"); pair.setSecond("Second"); // getting both object and printing System.out.println(pair.getFirst()); System.out.println(pair.getSecond());