can you create interface instance ?
Answer Posted / shanmukha
Hi,
We can't create instance for an interface or abstract
class.Just remove the following code from the program
written by Uday.
interface Test
{
public void wish();
}
Remove the above code and run the program,then program will
compile and execute properly,because he used anonymous class.
| Is This Answer Correct ? | 11 Yes | 2 No |
Post New Answer View All Answers
Which is better list or arraylist in java?
Can we execute a program without main?
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.
What do you mean by ternary operator in java?
What are nested classes in java?
which is advanced deep technology in java launched by the sun microsystem??? The answer is very logical If u need correct answer mail me at priya_gupta@gmail.com
What is a numeric digit?
Is heap stored in ram?
What is a generic data type?
What are the new features in java 8?
Is .net better than java?
What do you mean by hashing?
what do you mean by marker interface in java?
Why collection doesn’t extend cloneable and serializable interfaces?
What is difference between path and classpath in java?