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.
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
Object Oriented Programming In Java, you can write code that represents real objects. It's called OOP = Object Oriented Programming. If the programming is object oriented it must have objects. You object is a calculator. In real life, you also have an object that is known as a calculator. Object Objects in Java can easily map to… Continue reading First hut on the trail: Basics of Object Oriented Programming (OOP)