Why don't sun provide Object.getInternalAdress()?

Why is it so hard for sun to add the method getInternalAdress()-> long/java.math.BigInteger to Object (which gives the internal adress of the object).
In documentation for Object.hashCode() it is stated: "This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)"
And when you call Object.toString() that String has the internal adress in it.
So why cannot sun simply give access to the internal adress? It's obviously there! I can understand it has to do with platform-portability since for an example an int-adress would only work for 32-bit platform. But won't long or at least java.math.BigInteger be platform-portable?
Gil

Why is it so hard for sun to add the method
getInternalAdress()-> long/java.math.BigInteger to
Object (which gives the internal adress of the
object).For one reason, there would be no point to it. Java makes no guarantees about the memory layout of an object in memory or the size of objects, so what would you do with an address?
For another reason, objects move around in some JVMs (for example, when the heap is compacted), and in other JVMs objects stay still. If Sun provided a way to get the address of an object, programmers who developer with a JVM where objects stay still might assume objects stay still in all JVMs and write bad code.
For yet another reason, you cannot access arbitrary memory in Java, so there's nothing you could possibly do with an address anyway.
Can you give any reason why you might want the address of an object, keeping in mind the above points?

Similar Messages

  • Today I accidentally erased my Mac data....while I restart everything getting blank.....I try recover it by Internet by my MacBook don't even find my wifi...i have fail to restore it after all....why MacBook lion doesnt provide any recover tumb driver?

    Today I accidentally erased my Mac data....while I restart everything getting blank.....I try recover it by Internet by my MacBook don't even find my wifi...i have fail to restore it after all....why MacBook lion doesnt provide any recover tumb driver?

    It doesn't work...while I press the option button only shown up the internet recovery...I do have wifi..but my MacBook can not find my network at all...how?
    Why MacBook book lion doesn't provided any tumb drive recovery as previously?

  • Why Apple doesn't provide options in IOS to power off, reset, standby ipad/iPhone/ipod ? I don't se this opiton in IOS6 as well ? This option will help to avoid pressing power button less number of times and gives better user experience.

    Why Apple doesn't provide options in IOS to power off, reset, standby ipad/iPhone/ipod ? I don't se this opiton in IOS6 as well ? This option will help to avoid pressing power button less number of times and gives better user experience.

    They do.
    Standby = press the Power button
    Power off = Press and hold Power button then slide the red power off slider.
    Reset = Press and hold both Reset adn Home till you see the Apple logo.
    This option will help to avoid pressing power button less number of times and gives better user experience.
    Because it is better to not push the power button and more enjoyable to not push it?

  • Why we don't dispose SPList object using or Dispose methods?

    Hi Friends,
    Why we don't dispose SPList object in SharePoint server side object model?
    Could you please explain me indetails.
    Thanks
    Tiru
    Tiru

    SharePoint objects like SPWeb, SPSite holds a reference to an SPRequest object which holds a reference to a SharePoint COM object that is responsible to communicate with the backend SQL server.
    In case that the SPWeb object is not disposed when it is no longer used, then the connection to the SQL server will stay open and the memory allocated by the COM object will stay in memory as the COM object has not been asked to close the connection and to
    release the memory. However, SPList doesn't hold a reference to SPRequest. Hence it doesn't need to be disposed.
    See this for more information: http://blogs.technet.com/b/stefan_gossner/archive/2008/12/05/disposing-spweb-and-spsite-objects.aspx
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Why don't U pay attention to your adds on, like Provider for Google Calendar during your updates? It's not working all the time after your updates. Very annoyin

    I do not want to find a way every time and spend hours to connect THunderbird to Google calendar every new release. Why don't U solve this problem finally? Not everyone has special computer skills to find good APi or installation info, and many bullshits.
    Pls, do something that finally solve our problem.
    We like Thunderbird, but need to use Google calendar - to connect events to mobile phones- as thunderbird do not have this opportunity. So solve pls, or create a program that allow us to use normal calendar that we able to synch with our mobile phones.
    Thank you.

    '''"... it is a contentious subject since FF 4.0 and gets worse as time goes on."'''
    How about viewing that as '''''contiguous'''''? Like contiguous events.
    The developers moved the 'Reload current page' to the right-side of the Location Bar in Firefox 4, but allowed each user to move it where they wanted it via the Customize feature. Now with another major UI re-do in Firefox 29, that button can't be moved as easily, continuing what they started with Firefox 4.
    '''"Be sensible - let the user decide."'''
    Make the decision to install an add-on to change what you don't like, or as an IT professional use your talents to code your own changes either in the core code or via the 3 "user" files.
    ''Even Burger King dropped the "have it your way" concept.''

  • Why wait() is there in Object class why not in Thread class

    why wait() is there in Object class why not in Thread class .
    while we use wait() in the case of thread environment?
    If there is any situation where we use it without using threads please mention with example. or link to that example..

    839091 wrote:
    The question still remain un-answered as the answers provided are not clear. Can anybody explain why wait(), notify() methods are available in Object class and not thread?What part of the answers given did you not understand?
    Have you even tried writing any code that uses wait/notify and thought about how you'd write the same code if they existed only on Thread rather than on Object?
    Have you studied the basics of Java's multithreading?
    Do you know what a lock is?
    Do you know what the synchronized keyword does?
    Do you understand the relationship between synchronized and wait/notify?
    If you can answer yes to these questions, then the reason that wait/notify exist on Object should be obvious. So, which of the above are "no"?

  • Why is com.sun.config.ConfigureListener the frist one to be executed when T

    In JSF1.1 guessNumber demo
    The web.xml does not define a ServletContextListener.
    why is com.sun.config.ConfigureListener the frist one to be executed when Tomcat begins running?
    web.xml:
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <display-name>JavaServer Faces Guess Number Sample Application</display-name>
    <description>
    JavaServer Faces Guess Number Sample Application
    </description>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    <description>
    Set this flag to true if you want the JavaServer Faces
    Reference Implementation to validate the XML in your
    faces-config.xml resources against the DTD. Default
    value is false.
    </description>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>true</param-value>
    <description>
    Set this flag to true if you want the JavaServer Faces
    Reference Implementation to verify that all of the application
    objects you have configured (components, converters,
    renderers, and validators) can be successfully created.
    Default value is false.
    </description>
    </context-param>
    <!-- Faces Servlet -->
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup> 1 </load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/guess/*</url-pattern>
    </servlet-mapping>
    <security-constraint>
    <!-- This security constraint illustrates how JSP pages
    with JavaServer Faces components can be protected from
    being accessed without going through the Faces Servlet.
    The security constraint ensures that the Faces Servlet will
    be used or the pages will not be processed. -->
    <display-name>Restrict access to JSP pages</display-name>
    <web-resource-collection>
    <web-resource-name>
    Restrict access to JSP pages
    </web-resource-name>
    <url-pattern>/greeting.jsp</url-pattern>
    <url-pattern>/response.jsp</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <description>
    With no roles defined, no access granted
    </description>
    </auth-constraint>
    </security-constraint>
    </web-app>
    com.sun.config.ConfigureListener is the frist one to be executed when Tomcat begins running?
    why?
    Thread: main
    <init>() : 98, com.sun.faces.application.ApplicationAssociate, ApplicationAssociate.java
    <init>() : 98, com.sun.faces.application.ApplicationImpl, ApplicationImpl.java
    getApplication() : 74, com.sun.faces.application.ApplicationFactoryImpl, ApplicationFactoryImpl.java
    application() : 384, com.sun.faces.config.ConfigureListener, ConfigureListener.java
    configure() : 427, com.sun.faces.config.ConfigureListener, ConfigureListener.java
    configure() : 402, com.sun.faces.config.ConfigureListener, ConfigureListener.java
    contextInitialized() : 332, com.sun.faces.config.ConfigureListener, ConfigureListener.java
    listenerStart() : 3669, org.apache.catalina.core.StandardContext, StandardContext.java
    start() : 4104, org.apache.catalina.core.StandardContext, StandardContext.java
    start() : 1012, org.apache.catalina.core.ContainerBase, ContainerBase.java
    start() : 718, org.apache.catalina.core.StandardHost, StandardHost.java
    start() : 1012, org.apache.catalina.core.ContainerBase, ContainerBase.java
    start() : 442, org.apache.catalina.core.StandardEngine, StandardEngine.java
    start() : 450, org.apache.catalina.core.StandardService, StandardService.java
    start() : 683, org.apache.catalina.core.StandardServer, StandardServer.java
    start() : 537, org.apache.catalina.startup.Catalina, Catalina.java
    invoke0() : -1, sun.reflect.NativeMethodAccessorImpl, NativeMethodAccessorImpl.java
    invoke() : 39, sun.reflect.NativeMethodAccessorImpl, NativeMethodAccessorImpl.java
    invoke() : 25, sun.reflect.DelegatingMethodAccessorImpl, DelegatingMethodAccessorImpl.java
    invoke() : 585, java.lang.reflect.Method, Method.java
    start() : 271, org.apache.catalina.startup.Bootstrap, Bootstrap.java
    main() : 409, org.apache.catalina.startup.Bootstrap, Bootstrap.java

    why is com.sun.config.ConfigureListener the frist one to be executed when Tomcat begins running(no config in web.xml)?

  • Why doesn't FIREFOX provide guidance for reverting back to 3.6.17?

    Don't like Firefox 4, want to revert back to what I previously had, but I'm not technically "adept." Why aren't we provided with simple, accurate step-by-step directions from FIREFOX on how to revert?

    Hi Stan,
    Firefox 4's lack of support for Billeo is our fault. While Billeo for Firefox 4 on Windows is ready for download from www.billeo.com, we're still working on the Mac version.
    We apologize for the delay. Please email [mailto:[email protected] [email protected]] and let us know you want to be notified as soon as our Browser App is ready for FF4 on Mac.
    Thanks and regards,
    The Billeo Support Team
    [mailto:[email protected] [email protected]]

  • Why don't we have hotspot option after upgrading to iOS 8.1?

    why don't we have hotspot option after upgrading to ios 8.1 ?

    Did you already update the carrier settings? The hotspot feature is provided by the carrier. Follow the steps in this article:
    iOS: Updating your carrier settings

  • TS3989 Why don't my photos appear on iCloud?

    Why Don't my photos appear on iCloud?

    Search this forum for gridbaglayout, flicker, scrollbar:
    GridbagLayout behavior problem
    http://forum.java.sun.com/thread.jsp?forum=57&thread=163738
    (solved)
    Components not appearing until clicked
    http://forum.java.sun.com/thread.jsp?forum=57&thread=361634
    (not solved)
    Scroll bars do not appear
    http://forum.java.sun.com/thread.jsp?forum=57&thread=308710
    (solved)
    about 1500 more posts
    --A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • WHY DON'T YOU AT LEAST IMPROVE THOSE BRUSH STROKES?!

    I'm a professional digital artist-illustrator for about 7 years now. using photoshop since early years of my career. CS2, CS4, CS5.. on more than several mashines, top line HP workstations and EliteBook.
    and one thing that bothers me and most of my colleagues is the quality of the brush strokes that PS provides.
    why don't you improve em for christsake?!?
    I must admit, this is a software issue, not mashine. neither the resolution, some options or tablet series has anything to do with this.. and it's especially visible on thicker strokes.
    we work on intuos3, intuos4, intuos5, apple, win and whatnot. ant it's most obvious that the brush lines are as ugly as hell in this program entirely through all series.
    when it comes to non-vector lineart, thats' basically why most of the artists/designers go for other progams, such as paint tool sai, sketchbook pro, manga studio and etc, and do the effects/coloring only in PS.
    here's an ex. how the brush lines end. + if you work slower/move your pen more precise they go even worse!
    I won't go further, like talking about the LAG with mixer brtushes and etc. most of the CG forums and communities are allready full of those discussions. you cannot even compete on this issue with other products.
    that might be also a solution to rise your sales around the globe. cos now - why to buy a <1200$ worth PS program in europe when you'll probably end up mainly using paint tool sai or sketchbook pro for around 90$ and go for GIMP (free software) for effects.

    I can understand a certain level of frustration, PAUZAK, but really?  Are you a part of the same universe I'm in?
    Your answer seems defensive; I'm just trying to help.
    Points answered:
    >then why other products managed to make it work?
    I was only commenting on the points made in the thread YOU linked to.  Apparently at least some people see the shoelace thing in the Wacom control panel.  Given that evidence, which I doubt was manufactured, your pretense seems to need questioning.  I suppose it's possible (actually, a certainty) that some products send different commands to the drivers than others, and that the drivers are doing things wrong only under some conditions.  That's why I asked whether the Smoothing setting affected your setup.
    >just like this forum.. can't make a reply like in other normal forums, or edit anything
    I'm having no problems replying, or editing using any of the major browsers, including Firefox.  I can't edit posts on an iPhone or iPad (not allowed to even try), but if you're using an actual computer and you can't even make the forum work, you have problems on your system.
    >adobe is. cannot make the most simple things to work right and not LAG
    Some operations in Photoshop are complex and when done with big brushes and all kinds of stuff (fuzzy edges, mixing, etc.) turned on they slow down, but with reasonable sized brushes I've been able to paint stuff, and I certainly don't have the world's fastest computer by today's standards.  And even so, I'm not sure that's a situation where it's not working right per se...  Maybe just one where a better computer is needed to paint with really big brushes and all the fancy stuff turned on.  That *could* be a better computer than any invented yet, but that's okay - see next year's lineup...
    >looks like the staff is obviously looking somewhere else
    Wow, and you posted that *right* after one of the senior Photoshop scientist/engineers at Adobe responded specifically to you.  When's the last time an engineer from any other big software company responded to you?
    >Photoshop is still a huge and expencive disappointment so far. ask any pro
    Yeah, all the pros just avoid Photoshop.  That's why Adobe is doing so poorly as a business.  They can hardly sell any copies at all! 
    PAUZAK, I'll go out on a limb and say making things up and trolling for shock value and blaming the world for your own problems probably aren't going to help you reach a solution.
    -Noel

  • Why Apple did not provide Installation Disk in MacBook Pro Mac OS Lion 10.7?

    I want to reinstall my MacBook Pro with Mac OS X Lion , I want to reinstall it without using Ethernet, Wi-fi, etc... I want to reinstall using a Installation Disk but there is no Installation Disk when I bought my MacBook Pro. Why Apple did not provide Installation Disk? It is better to have it. It is very useful. Right? I want to reinstall without using Ethernet. I want Installation Disk Mac OS X Lion! I ask price from Power Mac for upgrading . Php 1,500 .

    selcor wrote:
    Yeah, your right. I will pay a amount of Php 1,500 for upgrading or reinstalling to the Power Mac , . So expensive. Can I borrow your Installer of Mac OS X Lion or Mac OS X Mountaion Lion? ((= So that I upgrade or reinstall it for free?
    App store. Pay what your country's App store ask. Don't be a tightarse.
    Good Luck
    Pete

  • Why don't my mail boxes replicate on my other devices?

    why don't my mail boxes replicate on my other devices?

    The mail folders I set up on my iMac in Mail won't show up on my iPad/iPhone.  Cox is my internet provider and I use their mail as well as Apples.

  • HT204319 Why don't we list model number with this information rather than the month the model was released? e.g. MacBook 2,1 or 5,2 or whatever.

    Why don't we list model number with this information rather than the month the model was released?
    e.g. MacBook 2,1 or 5,2 or whatever.

    Generally, Apple refers to it's systems by what part of the year they are released, ie early - mid - late.  Some people do provide the model number when they post questions, however, generally, the time of year and year released equals the model number.

  • Why won't Apple provide a list of COMPATIBLE SET TOP DVD PLAYERS?

    Why won't Apple provide its users a comprehensive list of COMPATIBLE DVD SET TOP PLAYERS? If they have, can someone direct me (us) to it? Although most set top DVD players will read Apple burned DVD discs, many set top DVD players will NOT read DVD's burned with the combination of iDVD and or DVD Studio Pro software and the built-in burners that ship with Mac computers. Obviously this is a third-party related issue, but it might be nice to provide at least the know set-top DVD players that DO WORK with DVD's burned on Apple computers using Apple software.

    Although most set top DVD players will read Apple burned DVD discs, many set top DVD players will NOT read DVD's burned with the combination of iDVD and or DVD Studio Pro software and the built-in burners that ship with Mac computers
    Blatantly untrue ... pure BULL. I've been burning DVDs for years with my Mac and DVD-SP. After thousands of DVDs delivered to clients, I've only had two (yes, 2) complaints of playback issues.
    The two major factors to playback compatibility are the quality of the media and the bit rate used. Keep bit rates reasonable; don't use AIFF audio; use only good quality media like Verbatim or Taiyo Yuden and stay away from low quality media such as Memorex.
    -DH

Maybe you are looking for