Results 1 to 3 of 3
  1. #1
    sigssoft's Avatar
    sigssoft is offline Member
    Join Date
    Oct 2008
    Rep Power

    Default Confused beginner with Rectangle type question

    Hello my friends,


    I have an exercise that says:

    Write Java statements that define a variable named window of type Rectangle, and then create a rectangle object and assign it to that variable. The rectangle constructor has two int parameters
    I am very confused and do not catch what I am supposed to do here. I am using Objects First With Java and BlueJ.

    Thank your for any kind of help. Cheers! :)

  2. #2
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Rep Power


    i'm assuming this is part of a written assignment and assumes you have a class Rectangle already. In that case, you should look into declaring instances of classes and using constructors.

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    This is very basic.
    Do you know how to define a variable of any type?
    Do you have a text book with any examples?
    Do you have the java API documentation? Read about the Rectangle class.

Similar Threads

  1. Basic Question from Networking Beginner
    By JDCAce in forum Networking
    Replies: 7
    Last Post: 10-10-2008, 09:29 PM
  2. [SOLVED] Cast string type to int type
    By GilaMonster in forum New To Java
    Replies: 9
    Last Post: 09-17-2008, 11:43 AM
  3. Rectangle Intersection
    By Gwindow in forum Java 2D
    Replies: 1
    Last Post: 04-24-2008, 04:53 PM
  4. help with rectangle class
    By darkgt in forum New To Java
    Replies: 7
    Last Post: 11-14-2007, 07:19 PM
  5. bit confused on this question
    By money123 in forum New To Java
    Replies: 2
    Last Post: 07-27-2007, 01:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts