Variable that are declared inside method - local Variable that are declared inside class and outside method - instance Variable that are declared as static - static, Static can't be local ------------------------------------------------- data type types: primitive: int, long, float, short, double, boolean, char, byte non-primitive: Array, String ------------------------------------------------- Object: It is an entity that has state, behavior and identity. eg: chair- solid, tall, brown - state. Behavior - for sitting. Identity - table from my home which is unique. It can be physical or logical. Class: Collection of object, only logical When object acquires properties of parent object - inheritance. Eg. dog can acquire properties of Animal. Dog itself can bark and can eat like other animals. To perform one task in different ways - polymorphism. Eg. Draw() - it can be drawCircle() or...
Comments
Post a Comment