Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

private, public, protected

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Is there anyway we can see the underlying implementation for access specifiers & modifiers like "private, public, protected, native, synchronized, abstract etc..". For classes and methods we have API and can see how Sun/Oracle implemented.
 
author
Posts: 23956
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If you really want to, I guess you can get the source code for the JVM from open source. Google for "openjdk".

Be warn though, the code is complex. And written mostly in C and C++.

Henry
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:
If you really want to, I guess you can get the source code for the JVM from open source. Google for "openjdk".

Be warn though, the code is complex. And written mostly in C and C++.

Henry



But does that mean that any program written in Java will be slower than the same one written in C++?

(Can't believe Java was written using the shitty C++)
 
Henry Wong
author
Posts: 23956
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anchit Herredia wrote:
But does that mean that any program written in Java will be slower than the same one written in C++?



Using the same argument, you can say that assembly language is slower than C, because most assemblers are written in C.... well, assembly is arguable slower, but for a different reason

Remember, Java not only has a compiler (that optimizes), but the JVM has multiple just-in-time compilers that optimizes too. Comparing the speed of two compiled programs based on the language used for the compiler is not very valid.


Anchit Herredia wrote:
(Can't believe Java was written using the shitty C++)



Having worked with C++ for many years, and still working with it, I will be the first to say that the language has many warts.... but it is far from a "shitty" language". In fact, I would still list it as one of my favorites.

Henry
 
reply
    Bookmark Topic Watch Topic
  • New Topic