Solved

Consider the Counter Class Below. Public Class Counter

Question 76

Multiple Choice

Consider the Counter class below. public class Counter
{
Public int count = 0;
Public int getCount()
{
Return count;
}
Public void increment()
{
Count++;
}
}
Using the class above and the variables declared below, what is the value of num1.equals(num2) ?
Counter num1 = new Counter() ;
Counter num2 = num1;


A) true
B) false
C) nothing since equals is not defined for Counter

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions