Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-08-2008, 01:06 AM
sigssoft's Avatar
Member
 
Join Date: Oct 2008
Posts: 1
Rep Power: 0
sigssoft is on a distinguished road
Default Confused beginner with Rectangle type question
Hello my friends,



I have an exercise that says:

Quote:
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!
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 10-08-2008, 02:17 AM
Senior Member
 
Join Date: Sep 2008
Posts: 493
Rep Power: 1
emceenugget is on a distinguished road
Default
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 10-08-2008, 02:56 AM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Rep Power: 4
Norm is on a distinguished road
Default
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.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Question from Networking Beginner JDCAce Networking 7 10-10-2008 08:29 PM
[SOLVED] Cast string type to int type GilaMonster New To Java 9 09-17-2008 10:43 AM
Rectangle Intersection Gwindow Java 2D 1 04-24-2008 03:53 PM
help with rectangle class darkgt New To Java 7 11-14-2007 06:19 PM
bit confused on this question money123 New To Java 2 07-27-2007 12:14 PM


All times are GMT +2. The time now is 04:20 AM.



VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org