State the significance of public and private modifiers, JAVA Programming

Assignment Help:

State the significance of public, private, protected, default modifiers both singly and in combination and state the effect of package relationships on declared items qualified by these modifiers.

Public: Public class is visible in other packages, field is visible everywhere (class must be public too)

Private : Private variables or methods might be used only by an instance of the similar class that declares the variable or method, A private feature might only be accessed by the class that owns the feature.

Protected: Is available to all classes in the similar package and also available to all subclasses of the class that owns the protected feature. This access is given even to subclasses that reside in a dissimilar package from the class that owns the protected feature.

What you get by default i.e. without any access modifier (ie, public private or protected). It means that it is visible to all within an exact package.

 


Related Discussions:- State the significance of public and private modifiers

Explain the java.net package, Explain The java.net package Each package...

Explain The java.net package Each package describes a number of classes, interfaces, exceptions, and errors. For instance, the java.net package contains these, classes, interfa

We want an e commerce site, We want an E Commerce site Project Descripti...

We want an E Commerce site Project Description: We want an E Commerce site like fifacointrader.. You must have experience with that kind of work We will award the proje

Need to develop chat application for j2me, Need to develop Chat application...

Need to develop Chat application for j2me and I want Image Processing code Project Description: We want a chat application for a community website. Image processing and co

Prepare simple spring maven task, Prepare Simple spring maven task Proje...

Prepare Simple spring maven task Project Description: We want a very simple delivery for one of our tasks using Spring STS Maven project. This chat does not have UI interf

Development of an android app urgent, Development of an Android app urgent ...

Development of an Android app urgent Project Description: I am searching for some good android developer who has depth in knowledge of making an app. I am focusing on a certa

What is constraints explain with example, What is Constraints explain with ...

What is Constraints explain with example? One of the purposes to use constructors and setter techniques rather than directly accessing fields is to enforce constraints. For exa

Prepare an android keyboard, Prepare an android keyboard Project Descrip...

Prepare an android keyboard Project Description: I want to prepare an android keyboard that have many features.( i will describe later) I want the full app and a trial ver

Query and update the text database for a library , Implement a program to q...

Implement a program to query and update the text database for a library using a client/server model allowing multiple clients safe access to the database, and using a producer-cons

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd