Difference betwee public and protected and private Java

Tutorials Shared by the Internet Community

Advertisements


Synopsis

public, protected and private are three important keyword, which is used for access control in Java. Main difference between public and protected are

Statistics

  • Total Hits - 26995

  • Total Votes - 121 votes

  • Vote Up - 53 votes

  • Vote Down - 68 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Getting Started

  • Submitted By - Javin Paul

  • Submitted on - 2013-04-13 09:42:06

Description

public, protected and private are three important keyword, which is used for access control in Java. Main difference between public and protected are there access restriction, public is least restrictive, protected allows access outside package only subclass and private is most restrictive. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements