Method call problem in BlueJ
843785Feb 18 2009 — edited Feb 15 2010Hi All, I started studying programming this Year and I've started in Jave using BlueJ to write the programs.
I am having a problem calling a method and am wondering if anyone can take a look at my code and help???
The error I am getting is _"cannot find symbol - method WriteSerialPort(int,java,lang.String)"_ I have Bolded the area I believe is causing the issue
Here it is:
public class quoteprint
{
public static void main()
{
Boolean status;
status = serial.InitialiseSerialPort(1, 19200, 'E', 1);
if (status == false)
{
System.out.println( "Error initialising " + serial.errorString);
}
if (status == true)
{
status = serial.OpenSerialPort(1);
if (status == false)
{
System.out.println("Error Opening " + serial.errorString);
}
String data = dataToWrite();
status = serial.WriteSerialPort(1, data);
if (status == false) // 'check' code
{
System.out.println("Error Reading " + serial.errorString);
}
}
status = serial.CloseSerialPort(1);
}
// function to return the quote
private static String dataToWrite ()
*{*
return("Blah Blah");
*}*
}