• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

service() method overriden

 
Greenhorn
Posts: 11
Android Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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'
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oops
missed that
Thank you!
 
reply
    Bookmark Topic Watch Topic
  • New Topic