SlideShare ist ein Scribd-Unternehmen logo
1 von 2
import java.util.*;
class KDK
{ public static void main(String args[])
{ Set<String> Lhs=new LinkedHashSet<String>();
Lhs.add("India");
Lhs.add("England");
Lhs.add("Iran");
Lhs.add("India");
System.out.println(Lhs);
Lhs.remove("England");
System.out.println("set after removing"+"England"+Lhs);
System.out.println("iterating over set");
Iterator<String> i=Lhs.iterator();
while(i.hasNext())
System.out.println(i.next());
}
}
import java.util.*;
class KDK
{ public static void main(String args[])
{
Set<String> Lhs=new LinkedHashSet<String>();
Lhs.add("India");
Lhs.add("England");
Lhs.add("Iran");
Lhs.add("India");
System.out.println(Lhs);
Lhs.remove("England");
System.out.println("set after removing"+"England"+Lhs);
System.out.println("iterating over set");
Iterator<String> i=Lhs.iterator();
while(i.hasNext())
System.out.println(i.next());
}
}

Weitere Àhnliche Inhalte

Ähnlich wie practical 9.docx

UserInputHandlerjava package midterm2023 import javautil.pdf
UserInputHandlerjava package midterm2023 import javautil.pdfUserInputHandlerjava package midterm2023 import javautil.pdf
UserInputHandlerjava package midterm2023 import javautil.pdf
adityknits
 
Description (Part A) In this lab you will write a Queue implementati.pdf
Description (Part A) In this lab you will write a Queue implementati.pdfDescription (Part A) In this lab you will write a Queue implementati.pdf
Description (Part A) In this lab you will write a Queue implementati.pdf
rishabjain5053
 
Here is my code for a linefile editor import java.io.BufferedRea.pdf
Here is my code for a linefile editor import java.io.BufferedRea.pdfHere is my code for a linefile editor import java.io.BufferedRea.pdf
Here is my code for a linefile editor import java.io.BufferedRea.pdf
pratyushraj61
 
Java 5 and 6 New Features
Java 5 and 6 New FeaturesJava 5 and 6 New Features
Java 5 and 6 New Features
Jussi Pohjolainen
 
can do this in java please thanks in advance The code that y.pdf
can do this in java please thanks in advance The code that y.pdfcan do this in java please thanks in advance The code that y.pdf
can do this in java please thanks in advance The code that y.pdf
akshpatil4
 
collectionframework-141116005344-conversion-gate01.pptx
collectionframework-141116005344-conversion-gate01.pptxcollectionframework-141116005344-conversion-gate01.pptx
collectionframework-141116005344-conversion-gate01.pptx
hemanth248901
 
Please help me with a UML class diagram for the following code im.pdf
Please help me with a UML class diagram for the following code im.pdfPlease help me with a UML class diagram for the following code im.pdf
Please help me with a UML class diagram for the following code im.pdf
aioils
 
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdfLabprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
freddysarabia1
 
Implement a queue using a linkedlist (java)SolutionLinkedQueue.pdf
Implement a queue using a linkedlist (java)SolutionLinkedQueue.pdfImplement a queue using a linkedlist (java)SolutionLinkedQueue.pdf
Implement a queue using a linkedlist (java)SolutionLinkedQueue.pdf
kostikjaylonshaewe47
 
can you add a delete button and a add button to the below program. j.pdf
can you add a delete button and a add button to the below program. j.pdfcan you add a delete button and a add button to the below program. j.pdf
can you add a delete button and a add button to the below program. j.pdf
sales88
 
package singlylinkedlist; public class Node { public String valu.pdf
package singlylinkedlist; public class Node { public String valu.pdfpackage singlylinkedlist; public class Node { public String valu.pdf
package singlylinkedlist; public class Node { public String valu.pdf
amazing2001
 
for String name likedBy String like.pdf
for String name  likedBy                     String like.pdffor String name  likedBy                     String like.pdf
for String name likedBy String like.pdf
sachinactivepower
 
import static org.junit.Assert.;import java.util.Arrays; import.pdf
import static org.junit.Assert.;import java.util.Arrays; import.pdfimport static org.junit.Assert.;import java.util.Arrays; import.pdf
import static org.junit.Assert.;import java.util.Arrays; import.pdf
sudheerforce
 

Ähnlich wie practical 9.docx (20)

UserInputHandlerjava package midterm2023 import javautil.pdf
UserInputHandlerjava package midterm2023 import javautil.pdfUserInputHandlerjava package midterm2023 import javautil.pdf
UserInputHandlerjava package midterm2023 import javautil.pdf
 
Description (Part A) In this lab you will write a Queue implementati.pdf
Description (Part A) In this lab you will write a Queue implementati.pdfDescription (Part A) In this lab you will write a Queue implementati.pdf
Description (Part A) In this lab you will write a Queue implementati.pdf
 
Groovy
GroovyGroovy
Groovy
 
Favor composition over inheritance
Favor composition over inheritanceFavor composition over inheritance
Favor composition over inheritance
 
Here is my code for a linefile editor import java.io.BufferedRea.pdf
Here is my code for a linefile editor import java.io.BufferedRea.pdfHere is my code for a linefile editor import java.io.BufferedRea.pdf
Here is my code for a linefile editor import java.io.BufferedRea.pdf
 
Java 5 and 6 New Features
Java 5 and 6 New FeaturesJava 5 and 6 New Features
Java 5 and 6 New Features
 
can do this in java please thanks in advance The code that y.pdf
can do this in java please thanks in advance The code that y.pdfcan do this in java please thanks in advance The code that y.pdf
can do this in java please thanks in advance The code that y.pdf
 
collectionframework-141116005344-conversion-gate01.pptx
collectionframework-141116005344-conversion-gate01.pptxcollectionframework-141116005344-conversion-gate01.pptx
collectionframework-141116005344-conversion-gate01.pptx
 
Please help me with a UML class diagram for the following code im.pdf
Please help me with a UML class diagram for the following code im.pdfPlease help me with a UML class diagram for the following code im.pdf
Please help me with a UML class diagram for the following code im.pdf
 
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdfLabprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
 
Java Programs
Java ProgramsJava Programs
Java Programs
 
Implement a queue using a linkedlist (java)SolutionLinkedQueue.pdf
Implement a queue using a linkedlist (java)SolutionLinkedQueue.pdfImplement a queue using a linkedlist (java)SolutionLinkedQueue.pdf
Implement a queue using a linkedlist (java)SolutionLinkedQueue.pdf
 
sumOfSquaresimport java.util.;public class Arraylistoperation.pdf
sumOfSquaresimport java.util.;public class Arraylistoperation.pdfsumOfSquaresimport java.util.;public class Arraylistoperation.pdf
sumOfSquaresimport java.util.;public class Arraylistoperation.pdf
 
can you add a delete button and a add button to the below program. j.pdf
can you add a delete button and a add button to the below program. j.pdfcan you add a delete button and a add button to the below program. j.pdf
can you add a delete button and a add button to the below program. j.pdf
 
Creating a Facebook Clone - Part XXIX - Transcript.pdf
Creating a Facebook Clone - Part XXIX - Transcript.pdfCreating a Facebook Clone - Part XXIX - Transcript.pdf
Creating a Facebook Clone - Part XXIX - Transcript.pdf
 
package singlylinkedlist; public class Node { public String valu.pdf
package singlylinkedlist; public class Node { public String valu.pdfpackage singlylinkedlist; public class Node { public String valu.pdf
package singlylinkedlist; public class Node { public String valu.pdf
 
for String name likedBy String like.pdf
for String name  likedBy                     String like.pdffor String name  likedBy                     String like.pdf
for String name likedBy String like.pdf
 
Basic java, java collection Framework and Date Time API
Basic java, java collection Framework and Date Time APIBasic java, java collection Framework and Date Time API
Basic java, java collection Framework and Date Time API
 
import static org.junit.Assert.;import java.util.Arrays; import.pdf
import static org.junit.Assert.;import java.util.Arrays; import.pdfimport static org.junit.Assert.;import java.util.Arrays; import.pdf
import static org.junit.Assert.;import java.util.Arrays; import.pdf
 
Nice to meet Kotlin
Nice to meet KotlinNice to meet Kotlin
Nice to meet Kotlin
 

Mehr von nilesh405711

Frame-Script and Predicate logic.pptx
Frame-Script and Predicate logic.pptxFrame-Script and Predicate logic.pptx
Frame-Script and Predicate logic.pptx
nilesh405711
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
nilesh405711
 

Mehr von nilesh405711 (11)

A_Review_of_Cybersecurity_in_Grid-Connected_Power_Electronics_Converters_Vuln...
A_Review_of_Cybersecurity_in_Grid-Connected_Power_Electronics_Converters_Vuln...A_Review_of_Cybersecurity_in_Grid-Connected_Power_Electronics_Converters_Vuln...
A_Review_of_Cybersecurity_in_Grid-Connected_Power_Electronics_Converters_Vuln...
 
A_Cooperative_PoW_and_Incentive_Mechanism_for_Blockchain_in_Edge_Computing.pdf
A_Cooperative_PoW_and_Incentive_Mechanism_for_Blockchain_in_Edge_Computing.pdfA_Cooperative_PoW_and_Incentive_Mechanism_for_Blockchain_in_Edge_Computing.pdf
A_Cooperative_PoW_and_Incentive_Mechanism_for_Blockchain_in_Edge_Computing.pdf
 
Smart_Land_Registration_Using_BlockChain.pdf
Smart_Land_Registration_Using_BlockChain.pdfSmart_Land_Registration_Using_BlockChain.pdf
Smart_Land_Registration_Using_BlockChain.pdf
 
CHERUBIM_A_Secure_and_Highly_Parallel_Cross-Shard_Consensus_Using_Quadruple_P...
CHERUBIM_A_Secure_and_Highly_Parallel_Cross-Shard_Consensus_Using_Quadruple_P...CHERUBIM_A_Secure_and_Highly_Parallel_Cross-Shard_Consensus_Using_Quadruple_P...
CHERUBIM_A_Secure_and_Highly_Parallel_Cross-Shard_Consensus_Using_Quadruple_P...
 
Smart_Land_Registration_Using_BlockChain.pdf
Smart_Land_Registration_Using_BlockChain.pdfSmart_Land_Registration_Using_BlockChain.pdf
Smart_Land_Registration_Using_BlockChain.pdf
 
DQDB notes.pdf
DQDB notes.pdfDQDB notes.pdf
DQDB notes.pdf
 
Frame-Script and Predicate logic.pptx
Frame-Script and Predicate logic.pptxFrame-Script and Predicate logic.pptx
Frame-Script and Predicate logic.pptx
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 
Introduction06.ppt
Introduction06.pptIntroduction06.ppt
Introduction06.ppt
 
Network-20210426203825.ppt
Network-20210426203825.pptNetwork-20210426203825.ppt
Network-20210426203825.ppt
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
 

KĂŒrzlich hochgeladen

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 

KĂŒrzlich hochgeladen (20)

BhubaneswarđŸŒčCall Girls Bhubaneswar ❀Komal 9777949614 💟 Full Trusted CALL GIRL...
BhubaneswarđŸŒčCall Girls Bhubaneswar ❀Komal 9777949614 💟 Full Trusted CALL GIRL...BhubaneswarđŸŒčCall Girls Bhubaneswar ❀Komal 9777949614 💟 Full Trusted CALL GIRL...
BhubaneswarđŸŒčCall Girls Bhubaneswar ❀Komal 9777949614 💟 Full Trusted CALL GIRL...
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Jaipur ❀CALL GIRL 0000000000❀CALL GIRLS IN Jaipur ESCORT SERVICE❀CALL GIRL IN...
Jaipur ❀CALL GIRL 0000000000❀CALL GIRLS IN Jaipur ESCORT SERVICE❀CALL GIRL IN...Jaipur ❀CALL GIRL 0000000000❀CALL GIRLS IN Jaipur ESCORT SERVICE❀CALL GIRL IN...
Jaipur ❀CALL GIRL 0000000000❀CALL GIRLS IN Jaipur ESCORT SERVICE❀CALL GIRL IN...
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 

practical 9.docx

  • 1. import java.util.*; class KDK { public static void main(String args[]) { Set<String> Lhs=new LinkedHashSet<String>(); Lhs.add("India"); Lhs.add("England"); Lhs.add("Iran"); Lhs.add("India"); System.out.println(Lhs); Lhs.remove("England"); System.out.println("set after removing"+"England"+Lhs); System.out.println("iterating over set"); Iterator<String> i=Lhs.iterator(); while(i.hasNext()) System.out.println(i.next()); } }
  • 2. import java.util.*; class KDK { public static void main(String args[]) { Set<String> Lhs=new LinkedHashSet<String>(); Lhs.add("India"); Lhs.add("England"); Lhs.add("Iran"); Lhs.add("India"); System.out.println(Lhs); Lhs.remove("England"); System.out.println("set after removing"+"England"+Lhs); System.out.println("iterating over set"); Iterator<String> i=Lhs.iterator(); while(i.hasNext()) System.out.println(i.next()); } }