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
salantis [7]
2 years ago
8

Write a method that takes a Rectangle as a parameter, and changes the width so it becomes a square (i.e. the width is set to the

value of the length) (java)
Computers and Technology
1 answer:
Bumek [7]2 years ago
3 0

Answer:

Explanation:

The following code is written in Java, it is a function/method that takes in the length and width of the Rectangle as parameters and then overwrites the width to match the length. Then it prints both the length and width.

   public static void rectangleToSquare(int width, int length) {

       width = length;

       System.out.println("Width: " + width);

       System.out.println("Length: " + length);

       

   }

You might be interested in
This exspansion slot essentially replaced PCI and AGP slots
MrRa [10]
PCI and AGP slots have been replaced with PCI-E slot (PCI-Express). There are different types of PCI-E buses:

PCI Express 1x (250 [500] * MB/s)
PCI Express 2x (500 [1000] * MB/s)
PCI Express 4x (1000 [2000] * MB/s)
PCI Express 8x (2000 [4000] * MB/s)
PCI Express 16x (4000 [8000] * MB/s)
<span>PCI Express 32x (8000 [16000] * MB/s)

I hope that's what you meant :)</span>
4 0
3 years ago
What is a database query?
lana [24]
C.a form used to create a new tables for the database
8 0
2 years ago
Read 2 more answers
Which bitwise operation has the same effect as multiplying a by 16?
Shalnov [3]
<span>Jun 15, 2011 - Multiplication and division can be achieved using bit operators, for example .... I discovered pretty much the same thing for Sun CC close to 20 years ago. ... Just to add a rough estimation: On a typical 16-Bit processor ..... Doing it yourself willaffect readability and possibly have no effect on performance.</span><span>
</span>
4 0
2 years ago
Read 2 more answers
Cell styles can only be applied to the first five columns of a worksheet.<br> a.true<br> b.false
andreyandreev [35.5K]
The correct answer is A true! 
6 0
3 years ago
Read 2 more answers
Which group on the Note Master tab contains the command to add footers to the notes pages?
nasty-shy [4]

Answer:

Place Holders

Explanation:

5 0
3 years ago
Other questions:
  • If you want to wrap text so that it fits a particular cell size, which formatting section would you use?
    9·2 answers
  • A general rule for adding text to a slide is ____.
    8·2 answers
  • Which Internet Explorer security zone includes all Internet Web sites that are not specifically assigned to another zone?
    7·1 answer
  • Whats the answer to this question?
    7·1 answer
  • no one can succeed in his or her career without relying on others for help or opportunities. It’s best, though,
    13·1 answer
  • Hank is the network administrator responsible for managing the web server cluster for an e-commerce company. He’s worried about
    9·1 answer
  • Who can add entries to value log
    8·1 answer
  • The best way to take control of the first page of Google is to
    14·1 answer
  • Programs for embedded devices are often written in assembly language. Some embedded processors have limited instructions, like M
    5·1 answer
  • Keira is creating an app for her cross-country team. Users will input their race times and the output will be a graph showing th
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!