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
makkiz [27]
3 years ago
6

JAVA CODE.

Computers and Technology
1 answer:
kykrilka [37]3 years ago
3 0

Solution :

public class Rectangle  

{

int len,bre;

Rectangle(int l,int b)

{

setLength(l);

setBreadth(b);

}

void setLength(int l)

{

len=l;

}

void setBreadth(int b)

{

bre=b;

}

int getLength()

{

return len;

}

int getBreadth()

{

return bre;

}

void makeSquare(Rectangle r)

{

r.setBreadth(len);

System.out.println("Square Parameter");

System.out.println("Length:" +r.getLength() + " Length: ".getBreadth());

}

public static void main(String[] args){

Rectangle r=new Rectangle(10,5);

System.out.println("Rectangle Parameter");

System.out.println("Length:"+r.getLength()+" Breadth:"+r.getBreadth());

r.makeSquare(r);

 }

 }

}

You might be interested in
Which drugs are known to distort the perception of reality and thought processes
andrey2020 [161]
<span>The correct answer here is Hallucinogen.

Technically all drugs one way or another distort the perception of reality and thought processes but hallucinogens are especially potent in that regard. Hallucinogens are those agents that can cause, among other things, hallucinations and changes in consciousness, emotions and thoughts. LSD is maybe the most known representative of the hallucinogens. </span>
7 0
3 years ago
Windows organises information on computer using a
lana66690 [7]
B folder
hope i helped
8 0
3 years ago
Read 2 more answers
Electricity is the flow of in a conductor
Artyom0805 [142]
Electrons in a conductor
4 0
3 years ago
Read 2 more answers
With internet access you can send e mail to any computer in the world true or false
Salsk061 [2.6K]

Answer:

true

Explanation:

I think this answers is right

5 0
3 years ago
Read 2 more answers
What are the missing letters _A_TO_ ( 6 letters) a type of computer.
aliina [53]

Explanation:

its a laptop ☺️. . . . . .. . .

4 0
3 years ago
Read 2 more answers
Other questions:
  • Describe a situation where it would be advantageous to use the copper tape or aluminum foil instead of the A and B push buttons
    7·2 answers
  • If you want to add a picture to your document, you can __________. (Select all that apply.)
    10·1 answer
  • Human systems integration (hsi), a supportability issue that every program should consider, addresses such factors as accessibil
    10·1 answer
  • RDBMS stands for_________________
    12·1 answer
  • A(n) _______________ loop usually occurs when the programmer forgets to write code inside the loop that makes the test condition
    13·1 answer
  • To use a stored address, C provides us with an indirection operator, ____.
    6·1 answer
  • Convert to octal. Convert to hexadecimal. Then convert both of your answers todecimal, and verify that they are the same.(a) 111
    12·1 answer
  • Which of the following is the code of acceptable behaviors users should follow while on the Internet; that is, it is the conduct
    15·1 answer
  • using a timer to generate a random number, develop a program that displays random numbers between 1 and 47 (or whatever) for you
    12·1 answer
  • Whats the flow in this code, and whats the risk that its creating and what can i do to fix it? (c language)
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!