What should be public and private, JAVA Programming

Assignment Help:

What should be public? What should be private?

As a rule of thumb:

  1. Classes are public.
  2. Fields are private.
  3. Constructors are public.
  4. Getter and setter methods are public.
  5. Other methods must be decided on a case by case basis.

All of these rules might be freely violated if you have a purpose for doing so. These are simply the defaults in which handle 90 percent of the cases.


Related Discussions:- What should be public and private

Java web services, #quThis project is based on the teams example of chapter...

#quThis project is based on the teams example of chapter 1. Instead of teams, you will consider employees working in a department in a company. (Departments and employees are ana

Explain in brief java applet, Explain in brief Java applet? It is a...

Explain in brief Java applet? It is a java program. It has been designed for transmitting Java code over the internet. It's automatically executed by Java-enabled W

Integration of neo4j and opengeo, Integration: Neo4J, OpenGeo, Ikanow Pr...

Integration: Neo4J, OpenGeo, Ikanow Project Description: I have an ongoing project to loosely integrate a variety of existing Open Source products: OpenGeo (geospatial server

Flash games, have some assignments and i want help with them. thanks

have some assignments and i want help with them. thanks

Convert US Dollars to Canadian Dollars, How to write a program that convert...

How to write a program that converts US dollars into Canadian dollars.The program let the user enter an amount in US dollars and display it equivalent value in Canadian dollars whe

Describe exception classes, Java Programming 1. Discuss any five buzz w...

Java Programming 1. Discuss any five buzz words in Java. 2. Describe exception classes and also explain common exceptions in java. 3. Describe primitive and abstract data

Explain function arguments with the help of an example, Explain function ar...

Explain function arguments with the help of an example? Arguments on a function are comma separated list of data enclosed within braces. It describes interface among the web pa

Program, a program that groups items according to their number

a program that groups items according to their number

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