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

Primitive types in Java

Options
  • 09-05-2005 7: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 Posts: 15,443 ✭✭✭✭bonkey


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


  • Registered Users 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 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