Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about words in compiler error

 
Sergej Smoljanov
Ranch Hand
Posts: 467
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I know this behavior before. My question is why compiler error "overridden method does not throw Exception" and " meth1() in BB cannot override meth1() in AA return type int is not compatible with void" use word overriding not hiding? (i think this is strange)
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume they use "override", because to correctly "hide" such a method the overriding rules apply. So it's probably an extra hint.

These code snippet compiles and demonstrates the use of a few overriding rules:


Hope it helps!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic