Results 1 to 5 of 5
- 09-09-2011, 09:10 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 9
- Rep Power
- 0
- 09-09-2011, 09:11 PM #2
Member
- Join Date
- Sep 2011
- Posts
- 9
- Rep Power
- 0
Re: Dont know what im doing wrong here
public class Square
{
private int size;
private int xPosition;
private int yPosition;
private String color;
private boolean isVisible;
/**
* create a new square with arbitrary field values.
*/
public Square (int theSize,int theXPosition, int theYPosition,
String theColor , boolean theVisibility)
{
size= theSize;
xPosition= theXPosition;
yPosition= theYPosition;
color= theColor;
if (theVisibility)
makeVisible();
else
makeInvisible();
- 09-09-2011, 09:35 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,603
- Blog Entries
- 7
- Rep Power
- 17
Re: Dont know what im doing wrong here
Look at the top row; there's already a square1 variable defined there; in the last line you're trying to define a square1 variable again; just as the compiler was trying to tell you in the bottom line.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 09-09-2011, 09:49 PM #4
Member
- Join Date
- Sep 2011
- Posts
- 9
- Rep Power
- 0
Re: Dont know what im doing wrong here
So is it suppose to be
square1= Square(200,50,55,"black", true);
This is giving me an error as well
- 09-09-2011, 09:57 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,603
- Blog Entries
- 7
- Rep Power
- 17
Re: Dont know what im doing wrong here
When people rob a bank they get a penalty; when banks rob people they get a bonus.
Similar Threads
-
Out of Bounds. I dont know Why :L
By socboy6579 in forum New To JavaReplies: 10Last Post: 01-13-2011, 12:02 AM -
I dont know what's wrong with line 36. please help
By amrmb09 in forum Advanced JavaReplies: 31Last Post: 11-21-2010, 10:18 AM -
Hello! and I need help. I dont know were to start
By Fall0ut in forum New To JavaReplies: 10Last Post: 05-19-2010, 06:26 PM -
Sometimes get the right results sometimes dont
By Battlefeldt in forum New To JavaReplies: 0Last Post: 12-18-2009, 01:03 AM -
FileOutputStream, I dont know what Im doing wrong...
By Addez in forum New To JavaReplies: 6Last Post: 09-14-2009, 10:46 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks