java interview question and answer can an abstract class declared as final

Pubblicato il: 21 settembre 2012
sul canale di: Interview DOT
1,104
3

Click here -    / @interviewdot   to get notifications. http://www.interviewdot.com


Welcome to www.InterviewDot.com How to prepare for Java interview Questions :

Top 20 Java Interview Questions and Answers :

Can an "abstract class" be declared as final ?
An abstract class cannot be declared as "final", because of following reasons :

If we declare a class as abstract then we can't instantiate that class ( only we can extend that class) .
And if create a class as final then we can't extend that class.

Public abstract final class demoAbstract {

//compiler error : The class demoAbstract can be either abstract or final, not both

}


For more Java Interview questions and answers - logon to www.InterviewDot.com - India's Top Interview Guide.


In questa pagina del sito puoi guardare il video online java interview question and answer can an abstract class declared as final della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Interview DOT 21 settembre 2012, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,104 volte e gli è piaciuto 3 spettatori. Buona visione!