Search:

Type: Posts; User: Samaras

Search: Search took 0.10 seconds.

  1. Replies
    6
    Views
    4,149

    Re: Abstract classes, and 'instanceOf'

    So i you not implement an add with NumberType as argument then you probably get a compiler error.You could cast inside this add function to real and then check for a null exception.If this exception...
  2. Replies
    6
    Views
    4,149

    Re: Abstract classes, and 'instanceOf'

    Why doing this?The method add is overloaded,so when called with real or complex number,at compilation time the compiler will select the right one.You do not need to check it by yourself.
Results 1 to 2 of 2