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

Primitive types in Java

  • 09-05-2005 6:39pm
    #1
    Closed Accounts Posts: 73 ✭✭


    Anyone know do all primitives indirectly implement serializable in java, which makes them legal types for parameter passing in rmi.


Comments

  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Don't they get boxed into their non-primitive equivalents?


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Thats what I thought to (not sure tbh.. need to look it up). So you doing your homework or something?


  • Closed Accounts Posts: 73 ✭✭gerryjuice


    Got an exam coming up, and just trying to get my head around some principles


  • Registered Users, Registered Users 2 Posts: 1,184 ✭✭✭causal


    My understanding is that primitives implement nothing because they're, well, primitives i.e. not a class (that can implement an interface) or an interface (that can extend an interface).

    All of the primitives respective wrapper classes do implement serializable, and comparable:

    Primitive - Wrapper Class
    boolean - Boolean
    byte - Byte
    char - Character
    double - Double
    float - Float
    int - Integer
    long - Long
    short - Short

    hth,
    causal


Advertisement