Re: mcq



On 31 May 2007 11:09:40 -0700, FX <taranfx@xxxxxxxxx> wrote:

Given:
1. class Super {
2. public float getNum() { return 3.0f; }
3. }
4.
5. public class Sub extends Super {
6.
7. }
Which method, placed at line6, causes compilation to fail?
A. public void getNum() { }
B. public void getNum(double d) { }
C. public float getNum() { return 4.0f; }
D. public double getNum(float d) { return 4.0d; }

You forgot to include your instructor's e-mail. Without that we
cannot send in the answers to your homework. I am afraid you will
have to do it yourself.

How about trying to compile the four different options provided and
see which one fails? You never know, you might actually learn
something.

rossum

.



Relevant Pages

  • Re: mcq
    ... Which method, placed at line6, causes compilation to fail? ... public void getNum() ... public void getNum ...
    (comp.lang.java.programmer)
  • Re: mcq
    ... Which method, placed at line6, causes compilation to fail? ... public void getNum() ... public void getNum ...
    (comp.lang.java.programmer)
  • Re: mcq
    ... public class Sub extends Super { ... Which method, placed at line6, causes compilation to fail? ... public void getNum ...
    (comp.lang.java.programmer)
  • Math::PARI tests fail on HP-UX.11 and Linux RH7.3
    ... I've successfullly compiled Net::SFTP on Solaris 8, ... Failed Test Stat Wstat Total Fail Failed List of Failed ... gmake: Leaving directory ... Compilation failed in require at line 1. ...
    (comp.lang.perl.modules)
  • Re: Math::PARI tests fail on HP-UX.11 and Linux RH7.3
    ... Solaris 8 where the compilation was succesfull. ... been using are compiled as 'thread-multi'. ... the plotting tests but the tests still fail. ... incorrect and tests fail. ...
    (comp.lang.perl.modules)