What will be the output of the program class Super { public Integer getLength() { return new Integer(4); } } public class Sub extends Super { public Long getLength() { return new Long(5); } public static void main(String[] args) { Super sooper = new Super(); Sub sub = new Sub(); System.out.println( sooper.getLength().toString() + "," + sub.getLength().toString() ); } }

Comments and Answers (2)

please anyone explain this answer

Shumbham

Shumbham

please explain answer

Avatar

{{SampleComment.userName || "Your Name"}} ~ {{SampleComment.userCity}}

{{SampleComment.commentValue || "Your Answer or Comment goes here...."}}