Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Primitive types in Java

  • 09-05-2005 07: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,171 ✭✭✭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