• Post Reply Bookmark Topic Watch Topic
  • New Topic

service() method overriden

 
Manassés Souza
Greenhorn
Posts: 11
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From www.javabeat.com:



Given answers:

a. The program will output 'ctor service init doGet destroy'.
b. The program will output 'ctor init doGet destroy'.
c. The program will output 'ctor service doGet destroy'.
d. The program will output 'ctor init service doGet destroy'.

And the mock exam show b as the correct answer

But I think that there's no correct answer, since service() method is overriden
So correct answer would be:

'ctor init service destroy'
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I think that there's no correct answer, since service() method is overriden

Overriden ? Or overloaded ? Check the method's signature.
 
Manassés Souza
Greenhorn
Posts: 11
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops
missed that
Thank you!
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!