• 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

Native Methods

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to Velumurgan's Notes :
"Abstract can appear with native declaration. This forces the entire class to be abstract.(obviously)"
and from Tidbits(Mention at MahaAnna's site ) :
"Abstract method cannot be declared static, final, synchronized, native or strictfp "
I am confused, which is true ?
 
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ishaan,
The second is true. Abstract methods cannot be declared native.
To prove this to yourself, try to compile this code:

You will see the following compilation error:


H:\java\Test.java:3: Abstract methods can't be native: void myMethod()
public abstract native void myMethod();


Hope this helps.
Stephanie
 
Ishaan Mohan
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Stephanie.
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
could anyone highlight me on strictfp (the usage and syntax of it)
and can anyone mail me the vel murugan's notes..
subs197@yahoo.com
thanks for your help,
subbu
 
reply
    Bookmark Topic Watch Topic
  • New Topic