Quantcast
Channel: S. Nageswara Rao, Corporate Trainer – Way2Java
Viewing all articles
Browse latest Browse all 505

Can you create instance of Interface?

$
0
0
No, it is not possible. Designers did not provide a way. Of course, it is of common sense also. Because interface contains only abstract methods and as abstract methods do not have a body (of implementation code), we cannot create an object. Suppose even if it is permitted, what is the use. Calling the abstract […]

Viewing all articles
Browse latest Browse all 505