SlideShare a Scribd company logo
1 of 1
Download to read offline
Implement this in Java
* Method to determine if a particular element is in this set.
* @param target * the element that needs to be found in this set
* @return * true if the target element is in this set, false otherwise
public boolean contains(int target)
{
}
Solution
public boolean contains(int target)
{
boolean flag=false;
for(Integer i:(this))
{
if(target==i.intValue())
{
flag=true;
break;
}
}
return flag;
}

More Related Content

More from arihantstoneart

For MIMO system, (a) Please talk about the advantage and disadvantag.pdf
For MIMO system, (a) Please talk about the advantage and disadvantag.pdfFor MIMO system, (a) Please talk about the advantage and disadvantag.pdf
For MIMO system, (a) Please talk about the advantage and disadvantag.pdfarihantstoneart
 
Explain why and give examples. In OO programming Polymorphism is on.pdf
Explain why and give examples. In OO programming Polymorphism is on.pdfExplain why and give examples. In OO programming Polymorphism is on.pdf
Explain why and give examples. In OO programming Polymorphism is on.pdfarihantstoneart
 
Eukaryotic cells modify RNA after transcription What critical RNA pr.pdf
Eukaryotic cells modify RNA after transcription  What critical RNA pr.pdfEukaryotic cells modify RNA after transcription  What critical RNA pr.pdf
Eukaryotic cells modify RNA after transcription What critical RNA pr.pdfarihantstoneart
 
Driverimport java.util.Scanner;A class that keeps a f.pdf
Driverimport java.util.Scanner;A class that keeps a f.pdfDriverimport java.util.Scanner;A class that keeps a f.pdf
Driverimport java.util.Scanner;A class that keeps a f.pdfarihantstoneart
 
Describe a data structure that supports both removeMin() and rem.pdf
Describe a data structure that supports both removeMin() and rem.pdfDescribe a data structure that supports both removeMin() and rem.pdf
Describe a data structure that supports both removeMin() and rem.pdfarihantstoneart
 
Columbus Incorporated just paid $4.3 per share dividend yesterday (i.pdf
Columbus Incorporated just paid $4.3 per share dividend yesterday (i.pdfColumbus Incorporated just paid $4.3 per share dividend yesterday (i.pdf
Columbus Incorporated just paid $4.3 per share dividend yesterday (i.pdfarihantstoneart
 
Anatomy Question Please Answer them all.A. Using a punnett square.pdf
Anatomy Question Please Answer them all.A. Using a punnett square.pdfAnatomy Question Please Answer them all.A. Using a punnett square.pdf
Anatomy Question Please Answer them all.A. Using a punnett square.pdfarihantstoneart
 
A person is lost in the desert. (S)he has no water and after a coupl.pdf
A person is lost in the desert. (S)he has no water and after a coupl.pdfA person is lost in the desert. (S)he has no water and after a coupl.pdf
A person is lost in the desert. (S)he has no water and after a coupl.pdfarihantstoneart
 
2. Describe an advantage and a limitation to tracing ancestry with b.pdf
2. Describe an advantage and a limitation to tracing ancestry with b.pdf2. Describe an advantage and a limitation to tracing ancestry with b.pdf
2. Describe an advantage and a limitation to tracing ancestry with b.pdfarihantstoneart
 
Write your thought on the following1. petroski notes that most en.pdf
Write your thought on the following1. petroski notes that most en.pdfWrite your thought on the following1. petroski notes that most en.pdf
Write your thought on the following1. petroski notes that most en.pdfarihantstoneart
 
You have two cell lines, a macrophage cell line and a CD4 T-cell lin.pdf
You have two cell lines, a macrophage cell line and a CD4 T-cell lin.pdfYou have two cell lines, a macrophage cell line and a CD4 T-cell lin.pdf
You have two cell lines, a macrophage cell line and a CD4 T-cell lin.pdfarihantstoneart
 
With X-linked inheritance, the X chromosome is transmitted in a diffe.pdf
With X-linked inheritance, the X chromosome is transmitted in a diffe.pdfWith X-linked inheritance, the X chromosome is transmitted in a diffe.pdf
With X-linked inheritance, the X chromosome is transmitted in a diffe.pdfarihantstoneart
 
When examining the central tendency of a probability distribution, u.pdf
When examining the central tendency of a probability distribution, u.pdfWhen examining the central tendency of a probability distribution, u.pdf
When examining the central tendency of a probability distribution, u.pdfarihantstoneart
 
What will organizations have to do to adapt to the influx of needed .pdf
What will organizations have to do to adapt to the influx of needed .pdfWhat will organizations have to do to adapt to the influx of needed .pdf
What will organizations have to do to adapt to the influx of needed .pdfarihantstoneart
 
What are the main functions of the components of prokaryotic vs. euk.pdf
What are the main functions of the components of prokaryotic vs. euk.pdfWhat are the main functions of the components of prokaryotic vs. euk.pdf
What are the main functions of the components of prokaryotic vs. euk.pdfarihantstoneart
 
There is a requirement to design a system to sense the presence of gl.pdf
There is a requirement to design a system to sense the presence of gl.pdfThere is a requirement to design a system to sense the presence of gl.pdf
There is a requirement to design a system to sense the presence of gl.pdfarihantstoneart
 
1. What are the characteristics of financial assets that have highly.pdf
1. What are the characteristics of financial assets that have highly.pdf1. What are the characteristics of financial assets that have highly.pdf
1. What are the characteristics of financial assets that have highly.pdfarihantstoneart
 
The tools that cyber criminals often use, including computer viruses.pdf
The tools that cyber criminals often use, including computer viruses.pdfThe tools that cyber criminals often use, including computer viruses.pdf
The tools that cyber criminals often use, including computer viruses.pdfarihantstoneart
 
The Poisson distribution analysis can be used to calculate the titer.pdf
The Poisson distribution analysis can be used to calculate the titer.pdfThe Poisson distribution analysis can be used to calculate the titer.pdf
The Poisson distribution analysis can be used to calculate the titer.pdfarihantstoneart
 
SaveI need help with this maze gui that I wrote in java, I am tryi.pdf
SaveI need help with this maze gui that I wrote in java, I am tryi.pdfSaveI need help with this maze gui that I wrote in java, I am tryi.pdf
SaveI need help with this maze gui that I wrote in java, I am tryi.pdfarihantstoneart
 

More from arihantstoneart (20)

For MIMO system, (a) Please talk about the advantage and disadvantag.pdf
For MIMO system, (a) Please talk about the advantage and disadvantag.pdfFor MIMO system, (a) Please talk about the advantage and disadvantag.pdf
For MIMO system, (a) Please talk about the advantage and disadvantag.pdf
 
Explain why and give examples. In OO programming Polymorphism is on.pdf
Explain why and give examples. In OO programming Polymorphism is on.pdfExplain why and give examples. In OO programming Polymorphism is on.pdf
Explain why and give examples. In OO programming Polymorphism is on.pdf
 
Eukaryotic cells modify RNA after transcription What critical RNA pr.pdf
Eukaryotic cells modify RNA after transcription  What critical RNA pr.pdfEukaryotic cells modify RNA after transcription  What critical RNA pr.pdf
Eukaryotic cells modify RNA after transcription What critical RNA pr.pdf
 
Driverimport java.util.Scanner;A class that keeps a f.pdf
Driverimport java.util.Scanner;A class that keeps a f.pdfDriverimport java.util.Scanner;A class that keeps a f.pdf
Driverimport java.util.Scanner;A class that keeps a f.pdf
 
Describe a data structure that supports both removeMin() and rem.pdf
Describe a data structure that supports both removeMin() and rem.pdfDescribe a data structure that supports both removeMin() and rem.pdf
Describe a data structure that supports both removeMin() and rem.pdf
 
Columbus Incorporated just paid $4.3 per share dividend yesterday (i.pdf
Columbus Incorporated just paid $4.3 per share dividend yesterday (i.pdfColumbus Incorporated just paid $4.3 per share dividend yesterday (i.pdf
Columbus Incorporated just paid $4.3 per share dividend yesterday (i.pdf
 
Anatomy Question Please Answer them all.A. Using a punnett square.pdf
Anatomy Question Please Answer them all.A. Using a punnett square.pdfAnatomy Question Please Answer them all.A. Using a punnett square.pdf
Anatomy Question Please Answer them all.A. Using a punnett square.pdf
 
A person is lost in the desert. (S)he has no water and after a coupl.pdf
A person is lost in the desert. (S)he has no water and after a coupl.pdfA person is lost in the desert. (S)he has no water and after a coupl.pdf
A person is lost in the desert. (S)he has no water and after a coupl.pdf
 
2. Describe an advantage and a limitation to tracing ancestry with b.pdf
2. Describe an advantage and a limitation to tracing ancestry with b.pdf2. Describe an advantage and a limitation to tracing ancestry with b.pdf
2. Describe an advantage and a limitation to tracing ancestry with b.pdf
 
Write your thought on the following1. petroski notes that most en.pdf
Write your thought on the following1. petroski notes that most en.pdfWrite your thought on the following1. petroski notes that most en.pdf
Write your thought on the following1. petroski notes that most en.pdf
 
You have two cell lines, a macrophage cell line and a CD4 T-cell lin.pdf
You have two cell lines, a macrophage cell line and a CD4 T-cell lin.pdfYou have two cell lines, a macrophage cell line and a CD4 T-cell lin.pdf
You have two cell lines, a macrophage cell line and a CD4 T-cell lin.pdf
 
With X-linked inheritance, the X chromosome is transmitted in a diffe.pdf
With X-linked inheritance, the X chromosome is transmitted in a diffe.pdfWith X-linked inheritance, the X chromosome is transmitted in a diffe.pdf
With X-linked inheritance, the X chromosome is transmitted in a diffe.pdf
 
When examining the central tendency of a probability distribution, u.pdf
When examining the central tendency of a probability distribution, u.pdfWhen examining the central tendency of a probability distribution, u.pdf
When examining the central tendency of a probability distribution, u.pdf
 
What will organizations have to do to adapt to the influx of needed .pdf
What will organizations have to do to adapt to the influx of needed .pdfWhat will organizations have to do to adapt to the influx of needed .pdf
What will organizations have to do to adapt to the influx of needed .pdf
 
What are the main functions of the components of prokaryotic vs. euk.pdf
What are the main functions of the components of prokaryotic vs. euk.pdfWhat are the main functions of the components of prokaryotic vs. euk.pdf
What are the main functions of the components of prokaryotic vs. euk.pdf
 
There is a requirement to design a system to sense the presence of gl.pdf
There is a requirement to design a system to sense the presence of gl.pdfThere is a requirement to design a system to sense the presence of gl.pdf
There is a requirement to design a system to sense the presence of gl.pdf
 
1. What are the characteristics of financial assets that have highly.pdf
1. What are the characteristics of financial assets that have highly.pdf1. What are the characteristics of financial assets that have highly.pdf
1. What are the characteristics of financial assets that have highly.pdf
 
The tools that cyber criminals often use, including computer viruses.pdf
The tools that cyber criminals often use, including computer viruses.pdfThe tools that cyber criminals often use, including computer viruses.pdf
The tools that cyber criminals often use, including computer viruses.pdf
 
The Poisson distribution analysis can be used to calculate the titer.pdf
The Poisson distribution analysis can be used to calculate the titer.pdfThe Poisson distribution analysis can be used to calculate the titer.pdf
The Poisson distribution analysis can be used to calculate the titer.pdf
 
SaveI need help with this maze gui that I wrote in java, I am tryi.pdf
SaveI need help with this maze gui that I wrote in java, I am tryi.pdfSaveI need help with this maze gui that I wrote in java, I am tryi.pdf
SaveI need help with this maze gui that I wrote in java, I am tryi.pdf
 

Recently uploaded

diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
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
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptxPoojaSen20
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
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
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
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
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint23600690
 
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
 
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
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
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
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
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
 

Recently uploaded (20)

diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
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...
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
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"
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
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
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.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
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
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
 
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
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
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...
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
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
 

Implement this in Java Method to determine if a particular elemen.pdf

  • 1. Implement this in Java * Method to determine if a particular element is in this set. * @param target * the element that needs to be found in this set * @return * true if the target element is in this set, false otherwise public boolean contains(int target) { } Solution public boolean contains(int target) { boolean flag=false; for(Integer i:(this)) { if(target==i.intValue()) { flag=true; break; } } return flag; }