wood burning stoves
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes strictfp doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "strictfp doubt" Watch "strictfp doubt" New topic

strictfp doubt

Kaarthick Ramamoorthy

Joined: Sep 01, 2006
Posts: 23
interface Perform
public strictfp abstract void add(double a, double b);
public strictfp abstract void sub(double a, double b);

why strictfp is not allowed here?.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
strictfp is an implementation detail, so it only allowed to be used in the classes that implement the interface. That is, you cannot force the implementor of your interface to use the strictfp feature.

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Don't get me started about those stupid light bulbs.
subject: strictfp doubt