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.
Hello friends ,
I am back here with my queries to be resolved by you.
Well i dont understand what is the significance of marker interface when there are no methos declaration in that ?
Could anyone highlight me the importance of marker interfaces ??
I hope you would resolve my query.This was one of the questions in the interview ..
Success is not doing extraordinary things but doing ordinary things extraordinarily well.
This is one of the very good questions asked. Marker interface does not have any methods. This is true. the basic thing is that when we implement a marker interface the java compiler notes that it has implemented a certain interface and it will try to assign some properties to the class that implemented it. Like if SingleThreadModel interface is implemented then there may be some variables which will get attached to the class and whenever the objects of these classes are accessed the variables which exist in the marker interface may come into picture. these will help in keeping the object accessed by the users one at a time as SingleThread model does. kindly correct if I am wrong. regards, shekar.