OOPS short notes
- Derived class to derived class is multilevel inheritance
- derived class inheritance from many base classes is called multiple inheritance
- Friend function can access all three data member(Public,private,protected)
- copy constructor must receive argument by pass by reference
- new operator is used to allocate memory dynamically
- reference can be automatically deference
- new calls constructor, malloc does not.
- new is an operator, malloc is a function.
- pure virtual function is defined only in derived class
- pure virtual function have to redefined for inherited class
- access modifiers are private,public,protected
- when class is declared no memory is allocated but when object is created then memory is allocated to class
- class is user defined data type which holds data type and data member
- the process of deriving new class from existing class is called as inheritance
- ::,.*. operators are not overloaded
- members of a class private by default, and members of a struct is public by default
- the function which have same name as of its class then that function is known as constructor
Java
single interface can extends multiple interfaces
single class can only extends single class
single class can implement multiple interfaces
- Abstract Class: if "is a" relations is exist .
- interface Class: if "is a" relations is not exist.
- ++++Finally
- if we want release local resources then we should finally block
- declaring float in java is 0.0F F is the float indication in java all other integers in float are accepted
- interfaces cannot be static if interfaces are not declared as static they are implicitly public
Comments
Post a Comment