I do not even know wht to tell u
Answer:
Hi there! The question is quizzing on your knowledge of type casting. Please find the explanation below.
Explanation:
The first program declares a Test class containing the main function in which two objects of class A are created and compared. The main function is the entry point of a Java program. After objects a1 and a2 are created, their comparison function “equals” is invoked and the result printed on the screen with the “System.out.println” method. The second program is the same in this respect, except for the implementation of class A. In the first program, class A has the property “x” defined as an int. The method “equals” accepts any object and type casts (converts) the passed object to a type of class A and compares and returns whether the property x of the type-casted object matches the property of the current object a. In the second program, the equals method of class A only accepts an input parameter of class A and returns whether the property x of the type-casted object matches the property of the current object a.
Answer:
You may nest while and do-while loops, but you may not nest for loops - False
Answer:
<em>#include <iostream></em>
<em>using namespace std;</em>
<em>int main()</em>
<em>{</em>
<em> int myNewAge;</em>
<em> int myCurrentAge = 29;</em>
<em> int currentYear = 2020;</em>
<em> </em>
<em>myNewAge = myCurrentAge+(2050-currentYear);</em>
<em />
<em>cout<<"My Current Age is "<<myCurrentAge<<". I will be "<<myNewAge<<" in 2050"<<endl;</em>
<em> return 0;</em>
<em>}</em>
Explanation:
The program is written in C++ language as required. firstly, we declare the three variables:
<em> </em><em>int myNewAge;</em>
<em> int myCurrentAge = 29;</em>
<em> int currentYear = 2020;</em>
Then we calculate the new age as: <em>myNewAge = myCurrentAge+(2050-currentYear);</em>
Using multiple cout operators (<em> </em><<) we display the output nicely as required by the question with this statement
<em>cout<<"My Current Age is "<<myCurrentAge<<". I will be "<<myNewAge<<" in 2050"<<endl;</em>
Answer:
A courses in information technology available at community colleges
Explanation:
Trust me