1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
natita [175]
1 year ago
15

The equals method of the Object class returns true only if the two objects being compared:_________

Computers and Technology
1 answer:
Andrej [43]1 year ago
4 0

Answer:

Option b) are the same object.

Explanation:

The equals is used to compare the two objects based on the equality of the objects and if they share the same memory address. Thus the same objects will return the same memory address in which case method requires true.

== and equals method are different in terms of comparison, identical attributes may not lead to the output being true.

You might be interested in
Write a program that takes an integer n as a parameter and sums all of the multiples of 2 or 5 from 1 to n. For example, if n =
Alex

Answer:

// here is code in c++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

// variable

int num;

int tot_sum=0;

cout<<"enter a number: ";

// read the value of n

cin>>num;

// check the multiple of 2 or 5 from 1 to n

for(int x=1;x<=num;x++)

{

// if multiple of 2 or 5 then add them

   if(x%2==0 ||x%5==0)

   {

       tot_sum=tot_sum+x;

   }

}

// print the sum

cout<<"sum of multiple of 2 or 5 is:"<<tot_sum<<endl;

return 0;

}

Explanation:

Read the number "n" from user.Check every number from 1 to n, if it is a multiple of 2 or 5 then add them to "tot_sum".When the for loop end, "tot_sum" will have sum of all the number which are either multiple of 2 or 5.Print the sum.

Output:

enter a number:11

sum of multiple of 2 or 5 is:35

4 0
2 years ago
4. What two important events occurred early in the formation of the universe?
Annette [7]
C. When they separated it created the big bang
4 0
3 years ago
Forms open in _______, which provides a user-friendly interface for entering data.
sergey [27]
They open in pdf format

5 0
3 years ago
To edit the text in a smartart graphic, what must be done first ?
ICE Princess25 [194]
C Hope this helps :D
8 0
2 years ago
Read 2 more answers
Filtering is a function of _____.
Levart [38]
The answer is: switches.

Explanation:

Filtering is a function of switches.
3 0
2 years ago
Other questions:
  • A hacker changing the ip addresses used in conjunction with a particular company’s web site to re-route them to the hacker’s ser
    11·1 answer
  • *Please* read before answering.
    14·1 answer
  • What part of the code is a signal for the function to execute and pass back a value?
    11·2 answers
  • For almost all networks today, including the internet, the communication protocol used is called ____.
    15·1 answer
  • What types of tools are used in the process of a digital or network investigation?
    12·1 answer
  • Explain the computer according to size​
    10·1 answer
  • Office 365 ProPlus can be deployed to your enterprise. When doing so, which tool enables you to choose the language, hardware ar
    5·1 answer
  • What is the purpose of extent in lines in engineering drawing
    12·1 answer
  • Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the cou
    13·1 answer
  • The ________ approach to motivation suggests a connection between internal physical states and outward behavior. achievement dri
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!