The purpose of private, protected is to hide the data and methods from outside 
class. Means the other classes(except C1) can not access private data which are 
created in one class(C1). This feature of OOP is called data hiding or 
abstraction
RegardsDeepak

--- On Thu, 10/3/11, deepak murali <deepakmural...@gmail.com> wrote:

From: deepak murali <deepakmural...@gmail.com>
Subject: [java programming] hai
To: "Java Programming Online Training Course By Sang Shin" 
<javaprogrammingwithpassion@googlegroups.com>
Date: Thursday, 10 March, 2011, 11:22 AM

in object oriented programming language like c++, we use access
specifiers like public,private and protected,
i know how to use them,but dont know what is main advantage of using
them.

are those access specifiers used to protect files, hide passwords etc
or they serve for different purpose

-- 
To post to this group, send email to javaprogrammingwithpassion@googlegroups.com
To unsubscribe from this group, send email to 
javaprogrammingwithpassion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en


-- 
To post to this group, send email to javaprogrammingwithpassion@googlegroups.com
To unsubscribe from this group, send email to 
javaprogrammingwithpassion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to