OOP: Instance variables, Class variables & Local variables

Table of contentsIntroductionInstance variablesClass variablesLocal variablesExampleCode (Java)Identifying variablesDeclaration and accessConclusionIntroduction Variables form an essential part of every application for storing, retrieving and generating dynamic data. In OOP (Object-Oriented Programming) there are three main types of variables which provide slightly different functionality; Instance variables, Class variables and Local variables. Instance variables An instance variable is a […]

OOP: Writing a class and creating objects

Table of contentsIntroductionExamplesJavaPHPConclusionIntroduction Classes and objects are a key principal of OOP (Object-Oriented Programming). The idea behind OOP is that classes are created to┬árepresent a real world entity; this real world entity could be a tangible object, such as a person or a car, or an intangible object, such as a job position or a […]