Answer Posted / julian c
Stop thinking like programmers saying "Object is a class in Java, c# etc".
I have in front of me a number of Whiffleplops of different colours; black, blue and red.
The black, blue and red Whiffleplops are three different objects. They are also of different sizes and I can play with them.
Do you have a Whiffleplop with you? No? (Why not).
Do you see that Whiffleplop is a CLASS of object that I can define as having two attributes (colour and size) and behaviour (you can play with it)? When you do get a Whiffleplop of any size or colour then you'll have an object, or an instance of the Whiffleplop class. You don;t have to have one for me to define the class though!
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the super keyword?
What is a static method? Why do we need static methods in java 8 interfaces?
What are virtual functions, base class pointer, derived class pointer, biding references?
What are the Differentiate between abstraction and encapsulation.
Can we override static methods of a class?
Is @functionalinterface annotation mandatory to define a functional interface? What is the use of @functionalinterface annotation? Why do we need functional interfaces in java?
What is operator overloading and polymorphism?
Explain the concept of multiple inheritance (virtual inheritance). Write about its advantages and disadvantages?
Explain what you understand by function overloading.
If a class inherits an interface, what are the 2 options available for that class?
Explain about the design phase?
Can you use virtual, override or abstract keywords on an accessor of a static property?
Write a note about inheritance?
Explain the implementation phase with respect to oop?
Explain what an object is.