Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

RTTI (Run-Time Type Information)

  • 13-05-2013 8:30pm
    #1
    Closed Accounts Posts: 2,663 ✭✭✭


    Have an Exam 2moro and this Question came up on one of the Past Papers..



    What is Rtti?
    What are the two main situations when RTTI is used?
    Give an example of each case. What is the main limitation of RTTI and what java feature is used to overcome this limitation?



    RTTI is Run-Time Type Information
    term that refers to retaining type information at run time


    but i cant what are the Main limitation of RTTI and what can some one do to over come this limitation


Comments

  • Registered Users, Registered Users 2 Posts: 76 ✭✭Punchin A Keyboard


    Even though the exam is gone, I presume this may be a c++ vs java question but my assumptions as well as my answer could be ****e.

    In c++ casting is used for rtti but you only know the internals of what you are casting too not the object being casted.
    In Java as a VM is being used, reflection was added to it so you can query the internals of an object.
    These internals are methods and signatures however I do not think return types can be determined by reflection. Even the privates of an object can be got/manipulated with reflection but underpants (accessor controls) are there for a reason.

    My 2c


Advertisement