Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply 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

Mind Q Question  RSS feed

 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Mind Q (at least the version giving with the Oracle Self Learning CDs) is the following question
Child is a subclass of Super, the following are a legal declarations.
Super super = new Child();
Child child = new Child();
The answer given is true but, I believe it should be false since super is a keyword and cannot be used as an idenitifier. If they had used _super or any other modification, it would be true.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup. Good call.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jim, i wonder if you could comment on this observation of mine. in cases like this in real exam, would it be safer to assume that the objective of the question is to test you the concept of inheritance and thus expect you to pick the one shown here, even if it is actually wrong? i hope nobody runs into this type of dilemma, but someone could, right? thanks.
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!