Is it possible to move variable's values from one class to another class without inheritance in java? [migrated]
I have learnt how to call methods and even variables between two classes. I wanted to know if you can move values from one class to another without using inheritance. Here is an example: I create ...
This might seem like an odd question, but I'm worried that I'm putting too many things as constants/finals at the top of my java class. I've started to put every value that is in my program into a ...
The app I'm developing needs to display lists of items. Simple enough, but there are a number of things which can change based on user input: Items can be added to/removed from the list. The items ...
Isn't scope just a way to organize classes, preventing outside code from accessing certain things you don't want accessed? More specifically, is there any functional gain to having public, protected, ...
If we need to represent classes in a class diagram for a big project that is not completely designed yet, and the classes have to be actual tables in a database, how would we predict and design the ...
What class structure allows for a base class and mix/match of subclasses? (Similar to Users w/ roles)
I have a set of base characteristics, and then a number of sub-types. Each instance must be one of the sub-types, but can be multiple sub-types at once. The sub-types of each thing can change. In ...
Suppose within the private portion of a class there is a value which is utilized by multiple private methods. Do people prefer having this defined as a member variable for the class or passing it as ...