Typecasting

Discussions

EJB design: Typecasting

  1. Typecasting (2 messages)

    1. long myLong = 50L;
    2. int myInt = (int) myLong;

    what is the data type of myLong after line 2?

    Threaded Messages (2)

  2. Typecasting[ Go to top ]

    myLong would remain Long
    It wont change
  3. Typecasting[ Go to top ]

    Mylong will remain the same.
    You are not changing it.