Results 1 to 1 of 1
hi guys,
I am new in this forum. I am not sure how to get help from here. i found this Also i am not sure that what ways i ...
- 10-01-2007 #1Just Joined!
- Join Date
- Oct 2007
- Posts
- 0
bluej help to write code
hi guys,
I am new in this forum. I am not sure how to get help from here. i found this Also i am not sure that what ways i expect to get help. I have got a project to make code from java Bluej. In this project i have to define the class. So here is the code i made from bluej. But the problem i am having is that i compiled it and then it say error in the code if you see this "setSquare(1,3) new Square(Color));" below. The error was ";" expected. Please use your own bluej and copy this code and find out what happen. Help me with this. i am not sure that should i show this problem like this way.
/**
* We define the class called square class
* @author (Anik Gupta)
* @version (20/09/07)
*/
public class Square
{
// instance variables - replace the example below with your own
private int x;
/**
* Constructor for objects of class Square
*/
public Square()
{
// initialise instance variables
x = 0;
setSquare(1,3) new Square(Color));
}
/**
* An example of a method - replace this comment with your own
*
* @param y a sample parameter for a method
* @return the sum of x and y
*/
public int sampleMethod(int y)
{
// put your code here
return x + y;
}
}
thankyou


Reply With Quote
