write a code showing the use of new operator in short?
Answers
Answered by
5
Explanation:
ABC on=new ABC(); Explanation: In the above example the code written is the creation of object where "ABC" is the name of the class and 'ob' is the name given to the new object which is created, thereafter the new operator is allocating memory to the newly created object 'ob' in the class "ABC"
Answered by
6
Explanation:
ABC on=new ABC(); Explanation: In the above example the code written is the creation of object where "ABC" is the name of the class and 'ob' is the name given to the new object which is created, thereafter the new operator is allocating memory to the newly created object 'ob' in the class "ABC"
Similar questions