• 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

A machine-code generator can inline the body of a final method ?

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I came across this in a practice exam

The answers are
a.
b.
e.
I unstand a and b, but will e be on the exam.
I have read through chapter 8 of Kathy and Bert's book and do not recall seeing this anywhere.
Should I spend some time studying this?
Thank You
 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wouldn't worry about that one, Ryan. You don't really need to know what the code looks like once it's compiled for the exam.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You needn't worry about the "hows" but you should know what inlining is and what are the implications of inlining. Here's an example:

Compile these three classes and run InlineTest. It will output "xxxxx". Now change s in Parent to "yyyyy", recompile Parent (not Child) and re-run InlineTest. It still prints "xxxxx". The reason is that s has been inlined in Child since it was marked as final. Try the same thing without s being marked as final and changes to s in Parent are picked up immediately in Child.
[ April 25, 2003: Message edited by: Thomas Paul ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic