Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8563397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:57:04+00:00 2026-06-11T16:57:04+00:00

Use the grow() method to modify a rectangle to be twice as large. I’m

  • 0

Use the grow() method to modify a rectangle to be twice as large.

I’m not sure if this is correct so if it is wrong please explain and feel free to correct me.

Kim.grow(5,8);
System.out.println(Kim);

Does this mean that my rectangle will now be twice as big if I code it like this or am I missing something?

grow(int 8, int v)….what would v be?..Im guessing h is the height

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:57:05+00:00Added an answer on June 11, 2026 at 4:57 pm

    According to the Javadocs, the grow(int h, int v) method re-sizes your rectangle such that:

    ..it is h units larger on both the left and right side, and v units
    larger at both the top and bottom.

    The new Rectangle has (x – h, y – v) as its upper-left corner, width
    of (width + 2h), and a height of (height + 2v).

    If negative values are supplied for h and v, the size of the Rectangle
    decreases accordingly. The grow method will check for integer overflow
    and underflow, but does not check whether the resulting values of
    width and height grow from negative to non-negative or shrink from
    non-negative to negative.

    I’m assuming that Kim is an instance of java.awt.Rectangle of dimensions (x, y)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to use a text-box (multiline) in my application. It need to grow
I use Core Data to maintain a persistent store, and the database can grow
I have an existing method (or function in general) which I need to grow
I've seen some sites that use jQuery Animate to get their images to grow
My App will require the use of about 500 images and this number could
I can't use callbacks because I have a scenario like this (pseudo-code): $('.box').on('click', function()
How can I write this if condition in switch method? if( $k != 'pg_id'
I know how to build Dynamically allocated arrays, but not how to grow them.
I'm building a large scale web application. It will grow in the future so
I use this code inside a subclass of CALayer which instances are sublayers of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.