In Java, the ‘final’ keyword is used to represent Composition . This is because the ‘Owner’ object expects a part object to be available and function by making it ‘final’. Let us take another example that depicts both inheritance and composition.
In Java, the ‘final’ keyword is used to represent Composition . This is because the ‘Owner’ object expects a part object to be available and function by making it ‘final’. Let us take another example that depicts both inheritance and composition.