aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "strictfp doubt" Watch "strictfp doubt" New topic
Author

strictfp doubt

Kaarthick Ramamoorthy
Greenhorn

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: strictfp doubt