Question:

What will be printed by the following code?

package A;

sub new { return bless {}; }
sub foo { return 'A'; }


package B;
use base 'A';

sub foo { return 'B'; }


package main;

my $obj = B->new();

print $obj->foo(), "\n";

Answers:


Keywords:

© 2017 QuizBucket.org