Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Can anybody answer these questions?  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
Questions:



1. Why interfaces methods cannot be decleared as protected?

2. Why overridden methods cannot be more restrictive than super class method (Assess specifier)?

3. Why overridden method cannot throw broader exception than superclass method exception?

4. Why it is not possible to change return type of overridden method ?

5. Why abstract classes are faster than interface?
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please check your Private Messages for an important administrative matter.
 
lAmit Joshi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
Its done
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Report post to moderator

lAmit Joshi wrote:
5. Why abstract classes are faster than interface?



It's because abstract class methos are found faster in an object at runtime than interface methods.
 
Rancher
Posts: 425
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't ask the same question in different forums.

Also, please use a meaningful subject line while asking questions.
 
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
I found a beautiful pie. And a tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!