Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Explain the differences between public, protected, private
and internal.

Answer Posted / rahul_kumar007

public:-
--------- It means we can access the property of public;
directly from out side of the class.

private:-
---------- it means we can't access the property of
private;
directly from out side the class.
and we can't intilizing the member var during run time
we have to use constuctor.
proctected:-
If we wnat to inherit private data member only onces.
then we make them protcted

Is This Answer Correct ?    10 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of type declarations?

1077


how to count no of words,characters,lines in a paragraph.

4377


Explain the process of converting a Tree into a Binary Tree.

2608


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1913


What are the valid places to have keyword “break”?

1039


What are volatile variables in c?

889


If the size of int data type is two bytes, what is the range of signed int data type?

975


What is difference between structure and union with example?

989


How will you write a code for accessing the length of an array without assigning it to another variable?

1001


Can a pointer be static?

1022


what is stack , heap ,code segment,and data segment

2634


How do you write a program which produces its own source code as output?

1060


what is the structure pointer?

2081


How can I open files mentioned on the command line, and parse option flags?

1015


What is the difference between exit() and _exit() function in c?

1019