This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Although i understood the main concept behind this question - that flipper method is final but private in Clidder.So we can have same method in Clidlet also.
But i never came across something like:
The only time i know that we can use a class name to call a method is, when the method is static.So my question is
what does Clidlet().flipper do?
Of course by looking at it, it seems that it is calling flipper method from class Clidlet.
But why this syntax- Clidlet()
Here is the program:
What is the result?
The answer given in the book is option A which is as expected.But i don't understand the syntax.
And also Anytime i use an object , i use following syntax:
classname refvariable = new classname();
But in above program: