Interviewer And Interviewee Guide

Java Classes Interview Question:

Tell me Is it possible to declare an anonymous class while implementing an interface?

Submitted by: Administrator
Interface i = new Interface(){/* Code}The above statement creates an instance of a class which implements the Interface "Interface". As name of class is not specified hence it is anonymous.
Submitted by: Administrator

Read Online Java Classes Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.