aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Doubt in K&B SCJP 5: topic Inner Classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Doubt in K&B SCJP 5: topic Inner Classes" Watch "Doubt in K&B SCJP 5: topic Inner Classes" New topic
Author

Doubt in K&B SCJP 5: topic Inner Classes

Carlos G�mez
Ranch Hand

Joined: Sep 06, 2006
Posts: 56
Hi ranchers

In K&B SCJP 5 book, page 658 says:

"The only modifiers you can apply to a method-local inner class are abstract and final. (Never both at the same time, though.)"

I think that is missing strictfp modifier.

SCJP 1.4
SCJP 1.5

[ December 11, 2006: Message edited by: Carlos G�mez ]
[ December 11, 2006: Message edited by: Carlos G�mez ]
Sanjeev Singh
Ranch Hand

Joined: Nov 01, 2006
Posts: 381
Yes strictfp can also be applied in method local inner class.Can anyone explains why is it so?


~Sanjeev Singh<br />SCJP 1.5
Maneessh saxena
Ranch Hand

Joined: Oct 03, 2006
Posts: 125
Hi Sanjeev,

Strictfp is the modifier which can be used in conjunction with class or method only.this modifier ensures that a class marked as strictfp means that any method code in the class will conform to the IEEE 754 standard rules for floating points. Without that modifier,floating points used in the methods might behave in a platform-dependent way. If you don't declare a class as strictfp, you can still get strictfp behavior on a method-by-method basis, by declaring a method as strictfp.
As this modifier is applied to both method & classes so we can also use this modifier to Metnod Local Inner Class.
I hope it'll help.

Regards
Maneesh Saxena


SCJP 1.4, SCWCD 1.5
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8829
    
    5
Hi guys,

We tried to walk a bit of a tightrope when we wrote the book. Our general strategy was to include the facts that are important for the exam, and not attempt to cover the entire Java specification. So, for instance, on this strictfp issue, we didn't say it because it's an unusual case that's not on the exam.

Likewise, we sometimes list "parts" of a particular API. Usually we will say something like "these are the important methods" - so you know that we're not reproducing the entire API.

In general, remember that we're trying to cover about 110% of what you'll need for the exam, but that's a lot less than all of what's possible in Java!
[ December 11, 2006: Message edited by: Bert Bates ]

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Originally posted by raunak saxena:
Hi Sanjeev,

Strictfp is the modifier which can be used in conjunction with class or method only.this modifier ensures that a class marked as strictfp means that any method code in the class will conform to the IEEE 754 standard rules for floating points. Without that modifier,floating points used in the methods might behave in a platform-dependent way. If you don't declare a class as strictfp, you can still get strictfp behavior on a method-by-method basis, by declaring a method as strictfp.
As this modifier is applied to both method & classes so we can also use this modifier to Metnod Local Inner Class.
I hope it'll help.

Regards
Maneesh Saxena


Hey, with that kind of prose you should write a book.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Maneessh saxena
Ranch Hand

Joined: Oct 03, 2006
Posts: 125
Originally posted by Barry Gaunt:


Hey, with that kind of prose you should write a book.


Hi Barry,

I guess you must be kidding

Regards
Maneesh Saxena
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Originally posted by raunak saxena:


Hi Barry,

I guess you must be kidding

Regards
Maneesh Saxena


Well if you did not write that, then who did?
Maneessh saxena
Ranch Hand

Joined: Oct 03, 2006
Posts: 125
Originally posted by Barry Gaunt:


Well if you did not write that, then who did?


I have written the same.I studied this topic from Khalid K&B & Mughal.
Carlos G�mez
Ranch Hand

Joined: Sep 06, 2006
Posts: 56

Originally posted by Bert Bates:

Hi guys,
We tried to walk a bit of a tightrope when we wrote the book. Our general strategy was to include the facts that are important for the exam, and not attempt to cover the entire Java specification. So, for instance, on this strictfp issue, we didn't say it because it's an unusual case that's not on the exam.



I agree with you Bert, if you write a book of the java certification, "you
must write only about java certification". So, I understand you can't cover the entire Java specification.

SCJP 1.4
SCJP 5.0

[ December 12, 2006: Message edited by: Carlos G�mez ]
[ December 12, 2006: Message edited by: Carlos G�mez ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in K&B SCJP 5: topic Inner Classes