Home / MCQ Bank / Computer
Computer Constructors And Methods

class A{ A(String s){} A(){} } class B extends A{ B(){} B(String s){ super(s); } void test(){ // insert code here } } Which of the below code can be insert at line 7 to make clean compilation ?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • A a = new B()

Related Computer Questions

Numbers in PHP can't be infinitely large or small, there is some minimum and maximum size. If more larger (or smaller) numbers are needed then ______ must be used: 1. GPM libraries 2. GMP libraries 3. CBMath 4. BCMath In HBase, what does the term "HBase MemStore Flush" refer to? Identify the type of error in the following Python codes? Print(“Good Morning”) print(“Good night) Which of the following uses relatively small amount of data to estimate about bigger population? What will be the output of the following C code? #include <stdio.h> int main() { int p = 10, q = 20, r; if (r = p = 5 || q > 20) printf("%d", r); else printf("No Output\n"); }