Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #33330

Re: method parameter binding

Newsgroups comp.lang.java.programmer
Date 2015-12-10 08:20 -0800
References <6bfa4a78-934e-4f90-8e5f-a2f56e529842@googlegroups.com> <b3b24809-56ed-4aa5-ac5f-f5893571d451@googlegroups.com> <n4c8dt$kki$1@news.albasani.net>
Message-ID <aa4751c4-f52e-4585-8dab-c99eb09bb69f@googlegroups.com> (permalink)
Subject Re: method parameter binding
From Eric Douglas <e.d.programmer@gmail.com>

Show all headers | View raw


On Thursday, December 10, 2015 at 11:15:10 AM UTC-5, Jan Burse wrote:
> Static method resolution is slightly different than
> dynamic method resolution.
> 
> In dynamic method resolution a sub class could still
> have overridden the method and thrown the exception.
> 
> Need more code...
> 
> Bye

I'm not sure I get what you're saying.  Certainly if it's an override it should choose that.

class One {
Number get( Double x, Double y ) 
{ 
    return new Double(x.doubleValue() + y.doubleValue()); 
} 

Number get( Long x, Long y ) 
{ 
    return new Long(x.longValue() + y.longValue()); 
} 
}
Class Two extends One {
Number get( Number x, Number y ) 
{ 
   throw new IllegalStateException("test"); 
} 
}

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

method parameter binding Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2015-12-10 07:44 -0800
  Re: method parameter binding Eric Douglas <e.d.programmer@gmail.com> - 2015-12-10 07:53 -0800
    Re: method parameter binding Jan Burse <janburse@fastmail.fm> - 2015-12-10 17:14 +0100
      Re: method parameter binding Eric Douglas <e.d.programmer@gmail.com> - 2015-12-10 08:20 -0800
        Re: method parameter binding Jan Burse <janburse@fastmail.fm> - 2015-12-10 17:23 +0100
          Re: method parameter binding Jan Burse <janburse@fastmail.fm> - 2015-12-10 17:23 +0100
      Re: method parameter binding Jan Burse <janburse@fastmail.fm> - 2015-12-10 17:21 +0100
        Re: method parameter binding Jan Burse <janburse@fastmail.fm> - 2015-12-10 17:27 +0100
          Re: method parameter binding Jan Burse <janburse@fastmail.fm> - 2015-12-10 17:28 +0100
            Re: method parameter binding Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-12-10 11:35 -0500
              Re: method parameter binding Martin Gregorie <martin@address-in-sig.invalid> - 2015-12-10 18:00 +0000
          Re: method parameter binding Eric Douglas <e.d.programmer@gmail.com> - 2015-12-10 08:41 -0800
            Re: method parameter binding j4n bur53 <janburse@fastmail.fm> - 2015-12-10 19:29 +0100
  Re: method parameter binding Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-12-10 11:33 -0500
  Re: method parameter binding Jan Burse <janburse@fastmail.fm> - 2015-12-10 22:34 +0100
    Re: method parameter binding Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-12-10 17:09 -0500
      Re: method parameter binding j4n bur53 <janburse@fastmail.fm> - 2015-12-11 09:27 +0100

csiph-web