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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!