SlideShare a Scribd company logo
Explain the difference between private and proctected members of a class.
Solution
Hi, I am explaning difference between private and public in context of Java Programing
Language(since you have not mentioned any Programing Language).
private : Members marked private can not be accessed by code in any class other than the class
in which the priavte member was declared.
- A private member is invisible to any code outside the member's own class.
- When a member(function) is declared private, a subclass can not inherit it.
protected :Â Â Members marked protected can be accessed by a subclass(child class) even if the
subclass is in a different package.

More Related Content

More from rtodd432

Explain the reasons why chloride ions (Cl-) is detrimental to corrosio.docx
Explain the reasons why chloride ions (Cl-) is detrimental to corrosio.docxExplain the reasons why chloride ions (Cl-) is detrimental to corrosio.docx
Explain the reasons why chloride ions (Cl-) is detrimental to corrosio.docx
rtodd432
 
Explain the purpose of a data member-SolutionAnswer Data Member It is.docx
Explain the purpose of a data member-SolutionAnswer Data Member It is.docxExplain the purpose of a data member-SolutionAnswer Data Member It is.docx
Explain the purpose of a data member-SolutionAnswer Data Member It is.docx
rtodd432
 
Explain the function of the following methods in LinkedList 1- addFirs.docx
Explain the function of the following methods in LinkedList 1- addFirs.docxExplain the function of the following methods in LinkedList 1- addFirs.docx
Explain the function of the following methods in LinkedList 1- addFirs.docx
rtodd432
 
Explain the motivation behind using a header file for a C program-Solu.docx
Explain the motivation behind using a header file for a C program-Solu.docxExplain the motivation behind using a header file for a C program-Solu.docx
Explain the motivation behind using a header file for a C program-Solu.docx
rtodd432
 
Explain the effect doping towards an intrinsic silicon- Give one examp.docx
Explain the effect doping towards an intrinsic silicon- Give one examp.docxExplain the effect doping towards an intrinsic silicon- Give one examp.docx
Explain the effect doping towards an intrinsic silicon- Give one examp.docx
rtodd432
 
Explain how goverment deficit lead to increases in the money supply-.docx
Explain how goverment deficit lead to increases in the money supply-.docxExplain how goverment deficit lead to increases in the money supply-.docx
Explain how goverment deficit lead to increases in the money supply-.docx
rtodd432
 
Explain how doping Si allows you to transport charges in a detector-So.docx
Explain how doping Si allows you to transport charges in a detector-So.docxExplain how doping Si allows you to transport charges in a detector-So.docx
Explain how doping Si allows you to transport charges in a detector-So.docx
rtodd432
 
Explain how an --interest group-- (or --special interest group--) may.docx
Explain how an --interest group-- (or --special interest group--) may.docxExplain how an --interest group-- (or --special interest group--) may.docx
Explain how an --interest group-- (or --special interest group--) may.docx
rtodd432
 
Explain how stock price volatility is more likely to imply risk than e.docx
Explain how stock price volatility is more likely to imply risk than e.docxExplain how stock price volatility is more likely to imply risk than e.docx
Explain how stock price volatility is more likely to imply risk than e.docx
rtodd432
 
Explain the concept entropy Explain the concept entropySolutionAnswe.docx
Explain the concept entropy   Explain the concept entropySolutionAnswe.docxExplain the concept entropy   Explain the concept entropySolutionAnswe.docx
Explain the concept entropy Explain the concept entropySolutionAnswe.docx
rtodd432
 
Explain how would you determine a covalent bond compounds bond using L.docx
Explain how would you determine a covalent bond compounds bond using L.docxExplain how would you determine a covalent bond compounds bond using L.docx
Explain how would you determine a covalent bond compounds bond using L.docx
rtodd432
 
Expansive (swelling) clays exist in various areas across North America.docx
Expansive (swelling) clays exist in various areas across North America.docxExpansive (swelling) clays exist in various areas across North America.docx
Expansive (swelling) clays exist in various areas across North America.docx
rtodd432
 
FInd and invertible matrix U so that UR - R is in Reduced Row echelon.docx
FInd and invertible matrix U so that UR - R is in Reduced Row echelon.docxFInd and invertible matrix U so that UR - R is in Reduced Row echelon.docx
FInd and invertible matrix U so that UR - R is in Reduced Row echelon.docx
rtodd432
 
Financial intermediaries play a crucial role in an economic crisisthey.docx
Financial intermediaries play a crucial role in an economic crisisthey.docxFinancial intermediaries play a crucial role in an economic crisisthey.docx
Financial intermediaries play a crucial role in an economic crisisthey.docx
rtodd432
 
Financial Institutions Describe each of the following financial instit.docx
Financial Institutions Describe each of the following financial instit.docxFinancial Institutions Describe each of the following financial instit.docx
Financial Institutions Describe each of the following financial instit.docx
rtodd432
 
Financial ratio analysis is conducted by managers- equity investors- l.docx
Financial ratio analysis is conducted by managers- equity investors- l.docxFinancial ratio analysis is conducted by managers- equity investors- l.docx
Financial ratio analysis is conducted by managers- equity investors- l.docx
rtodd432
 
Files are logical units of information created by processes- A disk ma.docx
Files are logical units of information created by processes- A disk ma.docxFiles are logical units of information created by processes- A disk ma.docx
Files are logical units of information created by processes- A disk ma.docx
rtodd432
 
Fill in the blank Accurate determination of abundances of isotopes bec.docx
Fill in the blank Accurate determination of abundances of isotopes bec.docxFill in the blank Accurate determination of abundances of isotopes bec.docx
Fill in the blank Accurate determination of abundances of isotopes bec.docx
rtodd432
 
Exercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docx
Exercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docxExercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docx
Exercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docx
rtodd432
 
QUESTION 3 Associate each application with the type of transmisision-.docx
QUESTION 3 Associate each application with the type of transmisision-.docxQUESTION 3 Associate each application with the type of transmisision-.docx
QUESTION 3 Associate each application with the type of transmisision-.docx
rtodd432
 

More from rtodd432 (20)

Explain the reasons why chloride ions (Cl-) is detrimental to corrosio.docx
Explain the reasons why chloride ions (Cl-) is detrimental to corrosio.docxExplain the reasons why chloride ions (Cl-) is detrimental to corrosio.docx
Explain the reasons why chloride ions (Cl-) is detrimental to corrosio.docx
 
Explain the purpose of a data member-SolutionAnswer Data Member It is.docx
Explain the purpose of a data member-SolutionAnswer Data Member It is.docxExplain the purpose of a data member-SolutionAnswer Data Member It is.docx
Explain the purpose of a data member-SolutionAnswer Data Member It is.docx
 
Explain the function of the following methods in LinkedList 1- addFirs.docx
Explain the function of the following methods in LinkedList 1- addFirs.docxExplain the function of the following methods in LinkedList 1- addFirs.docx
Explain the function of the following methods in LinkedList 1- addFirs.docx
 
Explain the motivation behind using a header file for a C program-Solu.docx
Explain the motivation behind using a header file for a C program-Solu.docxExplain the motivation behind using a header file for a C program-Solu.docx
Explain the motivation behind using a header file for a C program-Solu.docx
 
Explain the effect doping towards an intrinsic silicon- Give one examp.docx
Explain the effect doping towards an intrinsic silicon- Give one examp.docxExplain the effect doping towards an intrinsic silicon- Give one examp.docx
Explain the effect doping towards an intrinsic silicon- Give one examp.docx
 
Explain how goverment deficit lead to increases in the money supply-.docx
Explain how goverment deficit lead to increases in the money supply-.docxExplain how goverment deficit lead to increases in the money supply-.docx
Explain how goverment deficit lead to increases in the money supply-.docx
 
Explain how doping Si allows you to transport charges in a detector-So.docx
Explain how doping Si allows you to transport charges in a detector-So.docxExplain how doping Si allows you to transport charges in a detector-So.docx
Explain how doping Si allows you to transport charges in a detector-So.docx
 
Explain how an --interest group-- (or --special interest group--) may.docx
Explain how an --interest group-- (or --special interest group--) may.docxExplain how an --interest group-- (or --special interest group--) may.docx
Explain how an --interest group-- (or --special interest group--) may.docx
 
Explain how stock price volatility is more likely to imply risk than e.docx
Explain how stock price volatility is more likely to imply risk than e.docxExplain how stock price volatility is more likely to imply risk than e.docx
Explain how stock price volatility is more likely to imply risk than e.docx
 
Explain the concept entropy Explain the concept entropySolutionAnswe.docx
Explain the concept entropy   Explain the concept entropySolutionAnswe.docxExplain the concept entropy   Explain the concept entropySolutionAnswe.docx
Explain the concept entropy Explain the concept entropySolutionAnswe.docx
 
Explain how would you determine a covalent bond compounds bond using L.docx
Explain how would you determine a covalent bond compounds bond using L.docxExplain how would you determine a covalent bond compounds bond using L.docx
Explain how would you determine a covalent bond compounds bond using L.docx
 
Expansive (swelling) clays exist in various areas across North America.docx
Expansive (swelling) clays exist in various areas across North America.docxExpansive (swelling) clays exist in various areas across North America.docx
Expansive (swelling) clays exist in various areas across North America.docx
 
FInd and invertible matrix U so that UR - R is in Reduced Row echelon.docx
FInd and invertible matrix U so that UR - R is in Reduced Row echelon.docxFInd and invertible matrix U so that UR - R is in Reduced Row echelon.docx
FInd and invertible matrix U so that UR - R is in Reduced Row echelon.docx
 
Financial intermediaries play a crucial role in an economic crisisthey.docx
Financial intermediaries play a crucial role in an economic crisisthey.docxFinancial intermediaries play a crucial role in an economic crisisthey.docx
Financial intermediaries play a crucial role in an economic crisisthey.docx
 
Financial Institutions Describe each of the following financial instit.docx
Financial Institutions Describe each of the following financial instit.docxFinancial Institutions Describe each of the following financial instit.docx
Financial Institutions Describe each of the following financial instit.docx
 
Financial ratio analysis is conducted by managers- equity investors- l.docx
Financial ratio analysis is conducted by managers- equity investors- l.docxFinancial ratio analysis is conducted by managers- equity investors- l.docx
Financial ratio analysis is conducted by managers- equity investors- l.docx
 
Files are logical units of information created by processes- A disk ma.docx
Files are logical units of information created by processes- A disk ma.docxFiles are logical units of information created by processes- A disk ma.docx
Files are logical units of information created by processes- A disk ma.docx
 
Fill in the blank Accurate determination of abundances of isotopes bec.docx
Fill in the blank Accurate determination of abundances of isotopes bec.docxFill in the blank Accurate determination of abundances of isotopes bec.docx
Fill in the blank Accurate determination of abundances of isotopes bec.docx
 
Exercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docx
Exercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docxExercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docx
Exercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docx
 
QUESTION 3 Associate each application with the type of transmisision-.docx
QUESTION 3 Associate each application with the type of transmisision-.docxQUESTION 3 Associate each application with the type of transmisision-.docx
QUESTION 3 Associate each application with the type of transmisision-.docx
 

Recently uploaded

Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
Prof. Dr. K. Adisesha
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
ImMuslim
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
IsmaelVazquez38
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 

Recently uploaded (20)

Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 

Explain the difference between private and proctected members of a cla.docx

  • 1. Explain the difference between private and proctected members of a class. Solution Hi, I am explaning difference between private and public in context of Java Programing Language(since you have not mentioned any Programing Language). private : Members marked private can not be accessed by code in any class other than the class in which the priavte member was declared. - A private member is invisible to any code outside the member's own class. - When a member(function) is declared private, a subclass can not inherit it. protected :Â Â Members marked protected can be accessed by a subclass(child class) even if the subclass is in a different package.