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
anyanavicka [17]
2 years ago
9

A method which applies to the class in which it is declared as a whole and not in response to method calls on a specific object

is called a:_______
a. method call
b. an object method
c. private method
d. static method
Computers and Technology
1 answer:
Mandarinka [93]2 years ago
5 0

Answer:

D) Static method

Explanation:

A static method is a method that is created only for the class and not it's instance variables or objects. Such methods can only be accessed by calling them through the class's name because they are not available to any class instance. A static method is created by prefixing the method's name with the keyword static.

A static method cannot be overridden or changed. You create a static method for a block of code that is not dependent on instance creation and that can easily be shared by all instances or objects.

You might be interested in
Write a program that reads in an integer value for n and then sums the integers from n to 2 * n if n is nonnegative, or from 2 *
devlian [24]

Answer:

Following are the program in c++

First code when using for loop

#include<iostream> // header file  

using namespace std; // namespace

int main() // main method

{

int n, i, sum1 = 0; // variable declaration

cout<<"Enter the number: "; // taking the value of n  

cin>>n;

if(n > 0) // check if n is nonnegative

{

for(i=n; i<=(2*n); i++)

{

sum1+= i;

}

}

else //  check if n  is negative

{

for(i=(2*n); i<=n; i++)

{

sum1+= i;

}

}

cout<<"The sum is:"<<sum1;

return 0;

Output

Enter the number: 1

The sum is:3

second code when using while loop

#include<iostream> // header file  

using namespace std; // namespace

int main() // main method

{

int n, i, sum1 = 0; // variable declaration

cout<<"Enter the number: "; // taking the value of n  

cin>>n;

if(n > 0) // check if n is nonnegative

{

int i=n;  

while(i<=(2*n))

{

sum1+= i;

i++;

}

}

else //  check if n  is negative

{

int i=n;  

while(i<=(2*n))

{

sum1+= i;

i++;

}

}

cout<<"The sum is:"<<sum1;

return 0;

}

Output

Enter the number: 1

The sum is:3

Explanation:

Here we making 2 program by using different loops but using same logic

Taking a user input in "n" variable.

if n is nonnegative then we iterate the loops  n to 2 * n and storing the sum in "sum1" variable.

Otherwise iterate a loop  2 * n to n and storing the sum in "sum1" variable.  Finally display  sum1 variable .

4 0
3 years ago
Two or more computers connected together is referred to as a(n)
Grace [21]
Network, because network is something that connects an amount of tech to a source that could be shared to others.
7 0
3 years ago
Read 2 more answers
Arrange the steps in a sequence that you would follow while sorting data in a spreadsheet.
ss7ja [257]

Answer:

  1. In the spreadsheet menu, click the Data option.
  2. Select the column to sort.
  3. In the submenu of Data, click the Sort… option.
  4. In the Sort dialog box, click the “ascending” option for the  first sort criteria.
  5. Click OK.

Explanation:

The correct sequence is as shown above.

3 0
3 years ago
¿Que tres tipos de resistores conocemos?
PilotLPTM [1.2K]

carbon-composition resistors, carbon-film resistors, and metal-film resistors

No hablo español lo siento

3 0
3 years ago
Read 2 more answers
If you're working in a table that has three columns and five rows . the first row is the header row i want it to span all three
Ivenika [448]
Select the columns and merge.
3 0
3 years ago
Other questions:
  • What aspect do you need to keep in mind when you add images in a word document?
    11·2 answers
  • Using the expected format, of putting key information where the reader can’t find it, is an example of?
    8·2 answers
  • What is an allocation unit?
    10·1 answer
  • Write the definition of a class Clock. The class has no constructors and three instance variables. One is of type int called hou
    13·1 answer
  • Which of the following is an example of a federal tax? A. Social Security tax B. Sales tax C. Property tax D. Transaction tax
    8·1 answer
  • For which type of long-distance call do you need to tell the operator the name of the person to whom you wish to speak?
    10·1 answer
  • The first project that this position will work on is an embedded sensor that will send readings periodically to the cloud, and h
    9·1 answer
  • What are potential problems with using nanorobots ?
    14·1 answer
  • An end-user license agreement protects _____.
    11·1 answer
  • How does accenture generate value for clients through agile and devops?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!