Can an interface be final java marker interface job interview question

Pubblicato il: 20 novembre 2012
sul canale di: Interview DOT
865
4

Click here -    / @interviewdot   to get notifications. You can submit your resume for right Job
http://www.interviewdot.com/upload-re...
http://www.interviewdot.com http://www.interviewdot.com http://www.interviewdot.com

Welcome to www.InterviewDot.com
Can an interface be final ? Java Marker Interface ? Job Java Interview Questions

Can an interface be final ?

No,an interface cannot be final ,the compiler will have the following error.

Illegal modifier for the interface finalInterface; only public & abstract are permitted

What is a Marker Interface?

An interface which does not have any declaration inside but still enforces a mechanism.
Marker interface is used as a added to inform a message to the java compiler so that it can add special behavior to the class implementing it.
Examples :
java.io.Serializable
java.lang.Cloneable
java.util.EventListener
You can submit your resume for right Job
http://www.interviewdot.com/upload-re...
http://www.interviewdot.com http://www.interviewdot.com http://www.interviewdot.com

You can submit your resume for right Job
http://www.interviewdot.com/upload-re...
http://www.interviewdot.com http://www.interviewdot.com http://www.interviewdot.com


In questa pagina del sito puoi guardare il video online Can an interface be final java marker interface job interview question della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Interview DOT 20 novembre 2012, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 865 volte e gli è piaciuto 4 spettatori. Buona visione!