Computer Science Canada

What am i doing wrong here?

Author:  B-747 [ Thu Mar 31, 2005 7:51 pm ]
Post subject:  What am i doing wrong here?

Guys! i can't figure out this problem because this is my first time drawing stuff in Java! This is suppose to draw a line but i'm getting an error!




// The "Program2" class.
import java.awt.*;
import hsa.Console;

public class Program2
{
static Console c; // The output console

public static void main (String[] args)

{
c = new Console ();
int x1,x2,y1,y2;
x1=2;
x2=14;
x3=20;
x4=50;

void drawLine(x1,y1,x2,y2);
// Place your program here. 'c' is the output console
} // main method
} // Program2 class

Author:  Hikaru79 [ Sat Apr 02, 2005 9:13 pm ]
Post subject: 

Try replacing
Java:
void drawLine(x1,y1,x2,y2);
with
Java:
c.drawLine(x1,y1,x2,y2);


: