Answer:
The answer is "Option B".
Explanation:
In the given java program the main class test is defined. Inside the class, class b instance is created. In the next line, two-class are defined that is class A and class B and class B inherit class A.
In both classes we define a constructor and a method setI(). This method calculates the value that is passed in function and This class uses Overriding concept. In the given question other options are wrong that can be described as:
- In option A, Class B inherits class A and when class b object is created it is automatically called.
- In option C and option D, The constructor of class A is called but it displays 60, because of the constructor A call a function, that is setI() and passes value 20 parameter and because of using method overriding it display 60.
Simple stuff such as nice use optical technology. Depends on the mouse however
Answer:
As Africans were sold as slaves in America, they carried food from their home continent. These foods were added to what would be called southern food
Explanation:
Please mark Brainlist
Program to display greater number:
#include <iostream> <em>// Needed to perform IO operations </em>
#include<conio.h> <em> // header file</em>
using namespace std;
int main() //start of the program
{
int a , b =0; //initialising the two integer variable
cout<< "Enter first number"<<endl;
cin >> a; //user's first number
cout<< "Enter second number"<<endl;
cin >> b; //user's second number
if (a>b) //comparing the two integers input by user
cout<< a << "is greater than" << b; //display the greater number
else
cout<< b << "is greater than" << a;
return 0; // exist
}