Variables In Java, you use variables to store some information. Like in Calculator class you use 'model' and 'producentName' to store the information respectively about calculator's model and producer's name: In class Potato in main() method you also have a variable: Variables have a name (the word you use to refer to the value the variable… Continue reading A word on Java Types.
When I studied electronics everyone was using scientific calculator made by Casio. It model was fx350ES PLUS. Every second person had the same one. Like a real object has its own characteristics, so does Java Objects. Those characteristics are called attributes. The Calculator class you already know also has attributes describing it such as model or a producer:… Continue reading Inside the hut: class attributes
What are Methods? As I wrote in previous chapter methods do things. The method is a piece of code that has a name and can be used in various places of your program. After method finishes its task it can return a result. Let's take a look at the well-known method add: The method above… Continue reading Inside the hut: methods