SlideShare a Scribd company logo
What is the difference between a Socket object and a URLConnection object? How are they used
differently, and how are they similar?
Solution
similarities between socket objects and URL conncetion objecct
1)both are used for communication purposes
2)both can read and write the data
differences
URLConnection
1)here communication happens between URL(UNIFORM RESOURCE LOCATOR ) and the
object .
2the methods of URLConnection class forms the object of URLConnection class
sockets:
1)Here the methods are of socket type
2)The socket is bound to an address and listenins for connections

More Related Content

More from feelingsboutiques

Environmental sciencePlease answer it ASAP 1. Why do water man.pdf
Environmental sciencePlease answer it ASAP 1. Why do water man.pdfEnvironmental sciencePlease answer it ASAP 1. Why do water man.pdf
Environmental sciencePlease answer it ASAP 1. Why do water man.pdf
feelingsboutiques
 
Discuss a specific public health concern for each of the following g.pdf
Discuss a specific public health concern for each of the following g.pdfDiscuss a specific public health concern for each of the following g.pdf
Discuss a specific public health concern for each of the following g.pdf
feelingsboutiques
 
Due to your interference with organisms on the planet, one species o.pdf
Due to your interference with organisms on the planet, one species o.pdfDue to your interference with organisms on the planet, one species o.pdf
Due to your interference with organisms on the planet, one species o.pdf
feelingsboutiques
 
Complete the following chart, and then circle the layer that is found.pdf
Complete the following chart, and then circle the layer that is found.pdfComplete the following chart, and then circle the layer that is found.pdf
Complete the following chart, and then circle the layer that is found.pdf
feelingsboutiques
 
1a. What kinds of deductions are prohibited as a matter of public po.pdf
1a. What kinds of deductions are prohibited as a matter of public po.pdf1a. What kinds of deductions are prohibited as a matter of public po.pdf
1a. What kinds of deductions are prohibited as a matter of public po.pdf
feelingsboutiques
 
3. IQ tests are given to fifteen pairs of siblings. In each pair, one.pdf
3. IQ tests are given to fifteen pairs of siblings. In each pair, one.pdf3. IQ tests are given to fifteen pairs of siblings. In each pair, one.pdf
3. IQ tests are given to fifteen pairs of siblings. In each pair, one.pdf
feelingsboutiques
 
A rectangular board is 9 by 17 units. A string is connected to the f.pdf
A rectangular board is 9 by 17 units. A string is connected to the f.pdfA rectangular board is 9 by 17 units. A string is connected to the f.pdf
A rectangular board is 9 by 17 units. A string is connected to the f.pdf
feelingsboutiques
 
You have 20 marbles and 20 rocks. Place them into two boxes to incre.pdf
You have 20 marbles and 20 rocks. Place them into two boxes to incre.pdfYou have 20 marbles and 20 rocks. Place them into two boxes to incre.pdf
You have 20 marbles and 20 rocks. Place them into two boxes to incre.pdf
feelingsboutiques
 
Write a method named convertInfixToPostfix that accepts an Infix exp.pdf
Write a method named convertInfixToPostfix that accepts an Infix exp.pdfWrite a method named convertInfixToPostfix that accepts an Infix exp.pdf
Write a method named convertInfixToPostfix that accepts an Infix exp.pdf
feelingsboutiques
 
X and Y are continuous random variables with joint p.d.f. f(x,y) = c.pdf
X and Y are continuous random variables with joint p.d.f. f(x,y) = c.pdfX and Y are continuous random variables with joint p.d.f. f(x,y) = c.pdf
X and Y are continuous random variables with joint p.d.f. f(x,y) = c.pdf
feelingsboutiques
 
What is meant by cultural emergent and how does this differ from oth.pdf
What is meant by cultural emergent and how does this differ from oth.pdfWhat is meant by cultural emergent and how does this differ from oth.pdf
What is meant by cultural emergent and how does this differ from oth.pdf
feelingsboutiques
 
What are two main causes of recombination Errors in DNA replication.pdf
What are two main causes of recombination  Errors in DNA replication.pdfWhat are two main causes of recombination  Errors in DNA replication.pdf
What are two main causes of recombination Errors in DNA replication.pdf
feelingsboutiques
 
1.Developmental Biology brings together many different areas of stud.pdf
1.Developmental Biology brings together many different areas of stud.pdf1.Developmental Biology brings together many different areas of stud.pdf
1.Developmental Biology brings together many different areas of stud.pdf
feelingsboutiques
 
What is the role of Rb in the cell cycle and what types of mutations.pdf
What is the role of Rb in the cell cycle and what types of mutations.pdfWhat is the role of Rb in the cell cycle and what types of mutations.pdf
What is the role of Rb in the cell cycle and what types of mutations.pdf
feelingsboutiques
 
Which of the following factors does not affect membrane permeability.pdf
Which of the following factors does not affect membrane permeability.pdfWhich of the following factors does not affect membrane permeability.pdf
Which of the following factors does not affect membrane permeability.pdf
feelingsboutiques
 
Which of the following compounds cannot be used as an electron donor.pdf
Which of the following compounds cannot be used as an electron donor.pdfWhich of the following compounds cannot be used as an electron donor.pdf
Which of the following compounds cannot be used as an electron donor.pdf
feelingsboutiques
 
What would be the effect of severing the corpus callosumSolutio.pdf
What would be the effect of severing the corpus callosumSolutio.pdfWhat would be the effect of severing the corpus callosumSolutio.pdf
What would be the effect of severing the corpus callosumSolutio.pdf
feelingsboutiques
 
This question has been asked before and I dont understand what t.pdf
This question has been asked before and I dont understand what t.pdfThis question has been asked before and I dont understand what t.pdf
This question has been asked before and I dont understand what t.pdf
feelingsboutiques
 
The odds in favor of Nolan getting promoted are 74. Find the probab.pdf
The odds in favor of Nolan getting promoted are 74. Find the probab.pdfThe odds in favor of Nolan getting promoted are 74. Find the probab.pdf
The odds in favor of Nolan getting promoted are 74. Find the probab.pdf
feelingsboutiques
 
The DNA content of a diploid cell in the G1 phase of the cell cycle .pdf
The DNA content of a diploid cell in the G1 phase of the cell cycle .pdfThe DNA content of a diploid cell in the G1 phase of the cell cycle .pdf
The DNA content of a diploid cell in the G1 phase of the cell cycle .pdf
feelingsboutiques
 

More from feelingsboutiques (20)

Environmental sciencePlease answer it ASAP 1. Why do water man.pdf
Environmental sciencePlease answer it ASAP 1. Why do water man.pdfEnvironmental sciencePlease answer it ASAP 1. Why do water man.pdf
Environmental sciencePlease answer it ASAP 1. Why do water man.pdf
 
Discuss a specific public health concern for each of the following g.pdf
Discuss a specific public health concern for each of the following g.pdfDiscuss a specific public health concern for each of the following g.pdf
Discuss a specific public health concern for each of the following g.pdf
 
Due to your interference with organisms on the planet, one species o.pdf
Due to your interference with organisms on the planet, one species o.pdfDue to your interference with organisms on the planet, one species o.pdf
Due to your interference with organisms on the planet, one species o.pdf
 
Complete the following chart, and then circle the layer that is found.pdf
Complete the following chart, and then circle the layer that is found.pdfComplete the following chart, and then circle the layer that is found.pdf
Complete the following chart, and then circle the layer that is found.pdf
 
1a. What kinds of deductions are prohibited as a matter of public po.pdf
1a. What kinds of deductions are prohibited as a matter of public po.pdf1a. What kinds of deductions are prohibited as a matter of public po.pdf
1a. What kinds of deductions are prohibited as a matter of public po.pdf
 
3. IQ tests are given to fifteen pairs of siblings. In each pair, one.pdf
3. IQ tests are given to fifteen pairs of siblings. In each pair, one.pdf3. IQ tests are given to fifteen pairs of siblings. In each pair, one.pdf
3. IQ tests are given to fifteen pairs of siblings. In each pair, one.pdf
 
A rectangular board is 9 by 17 units. A string is connected to the f.pdf
A rectangular board is 9 by 17 units. A string is connected to the f.pdfA rectangular board is 9 by 17 units. A string is connected to the f.pdf
A rectangular board is 9 by 17 units. A string is connected to the f.pdf
 
You have 20 marbles and 20 rocks. Place them into two boxes to incre.pdf
You have 20 marbles and 20 rocks. Place them into two boxes to incre.pdfYou have 20 marbles and 20 rocks. Place them into two boxes to incre.pdf
You have 20 marbles and 20 rocks. Place them into two boxes to incre.pdf
 
Write a method named convertInfixToPostfix that accepts an Infix exp.pdf
Write a method named convertInfixToPostfix that accepts an Infix exp.pdfWrite a method named convertInfixToPostfix that accepts an Infix exp.pdf
Write a method named convertInfixToPostfix that accepts an Infix exp.pdf
 
X and Y are continuous random variables with joint p.d.f. f(x,y) = c.pdf
X and Y are continuous random variables with joint p.d.f. f(x,y) = c.pdfX and Y are continuous random variables with joint p.d.f. f(x,y) = c.pdf
X and Y are continuous random variables with joint p.d.f. f(x,y) = c.pdf
 
What is meant by cultural emergent and how does this differ from oth.pdf
What is meant by cultural emergent and how does this differ from oth.pdfWhat is meant by cultural emergent and how does this differ from oth.pdf
What is meant by cultural emergent and how does this differ from oth.pdf
 
What are two main causes of recombination Errors in DNA replication.pdf
What are two main causes of recombination  Errors in DNA replication.pdfWhat are two main causes of recombination  Errors in DNA replication.pdf
What are two main causes of recombination Errors in DNA replication.pdf
 
1.Developmental Biology brings together many different areas of stud.pdf
1.Developmental Biology brings together many different areas of stud.pdf1.Developmental Biology brings together many different areas of stud.pdf
1.Developmental Biology brings together many different areas of stud.pdf
 
What is the role of Rb in the cell cycle and what types of mutations.pdf
What is the role of Rb in the cell cycle and what types of mutations.pdfWhat is the role of Rb in the cell cycle and what types of mutations.pdf
What is the role of Rb in the cell cycle and what types of mutations.pdf
 
Which of the following factors does not affect membrane permeability.pdf
Which of the following factors does not affect membrane permeability.pdfWhich of the following factors does not affect membrane permeability.pdf
Which of the following factors does not affect membrane permeability.pdf
 
Which of the following compounds cannot be used as an electron donor.pdf
Which of the following compounds cannot be used as an electron donor.pdfWhich of the following compounds cannot be used as an electron donor.pdf
Which of the following compounds cannot be used as an electron donor.pdf
 
What would be the effect of severing the corpus callosumSolutio.pdf
What would be the effect of severing the corpus callosumSolutio.pdfWhat would be the effect of severing the corpus callosumSolutio.pdf
What would be the effect of severing the corpus callosumSolutio.pdf
 
This question has been asked before and I dont understand what t.pdf
This question has been asked before and I dont understand what t.pdfThis question has been asked before and I dont understand what t.pdf
This question has been asked before and I dont understand what t.pdf
 
The odds in favor of Nolan getting promoted are 74. Find the probab.pdf
The odds in favor of Nolan getting promoted are 74. Find the probab.pdfThe odds in favor of Nolan getting promoted are 74. Find the probab.pdf
The odds in favor of Nolan getting promoted are 74. Find the probab.pdf
 
The DNA content of a diploid cell in the G1 phase of the cell cycle .pdf
The DNA content of a diploid cell in the G1 phase of the cell cycle .pdfThe DNA content of a diploid cell in the G1 phase of the cell cycle .pdf
The DNA content of a diploid cell in the G1 phase of the cell cycle .pdf
 

Recently uploaded

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
ShivajiThube2
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 

Recently uploaded (20)

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 

What is the difference between a Socket object and a URLConnection o.pdf

  • 1. What is the difference between a Socket object and a URLConnection object? How are they used differently, and how are they similar? Solution similarities between socket objects and URL conncetion objecct 1)both are used for communication purposes 2)both can read and write the data differences URLConnection 1)here communication happens between URL(UNIFORM RESOURCE LOCATOR ) and the object . 2the methods of URLConnection class forms the object of URLConnection class sockets: 1)Here the methods are of socket type 2)The socket is bound to an address and listenins for connections