Select the correct option to test your answer:
Computer
Data Types And Variables
Difficulty: Medium
What will be the output of the following Java code? class A { final public int calculate(int a, int b) { return 1; } } class B extends A { public int calculate(int a, int b) { return 2; } } public class output { public static void main(String args[]) { B object = new B(); System.out.print("b is " + b.calculate(0, 1)); } }
More Computer Questions
How many elements does a floating point number is composed of?
What will be the output of the following Java code snippet? public class Test { public static void main(String[] args) { Set s = new HashSet(); s.add(new Long(10)); s.add(new Integer(10)); for(Object object : s) { System.out.println("test - "+object); } } }
Acknowledgments, sequencing, and flow control are characteristics of which OSI layer?
In R, which package provides tools for working with data from the World Bank?
Which term is not used to describe the memory component of a computer?