What kind of error it could be?
init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\2z7\StrokeFill\build\classes
C:\Documents and Settings\2z7\StrokeFill\src\ParseFile.java:82: incompatible types
found:int[]
required:int
return xy;
1 error
BUILD FAILED (total time: 0 seconds)
import java.io.*;
import java.util.List;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.ListIterator;
import java.util.regex.*;
import java.util.StringTokenizer;
publicclass ParseFile
{
private String Filename="newt3.newtmal.ps";
privateint x1, y1, x2, y2;// to plot lines from (x1,y1) to (x2,y2)
privateint xy[]=newint[205];
publicint setxy()
{
// parse a file to read line by line;
File file =new File(Filename);
try
{
BufferedReader br =new
BufferedReader(new FileReader(Filename));
String line;
String s1 ="0.5 setlinewidth 0.0 setgray";
String s2 ="stroke clear";
String s3 ="closepath fill";
String[] parts;
while ((line = br.readLine()) !=null )
{
if (line.equals(s1))
{
List<Integer> xList =new ArrayList<Integer>();
List<Integer> yList =new ArrayList<Integer>();
while ((line = br.readLine()) !=null && !line.equals(s2))
{
parts = line.split(" ");
xList.add(Integer.parseInt(parts[0]));
yList.add(Integer.parseInt(parts[1]));
}
Integer[] x = xList.toArray(new Integer[xList.size()]);
Integer[] y = yList.toArray(new Integer[yList.size()]);
// Plotting here using x and y arrays
int m = x.length;
for (int i = 0; i<m-1;i++)
{
xy[i]= x[i].intValue();
xy[i+m] = y[i].intValue();
// to return these values to class LinesRectsCirclesJPanel
}
// return xy;
}
elseif (line.split(" ").length == 8)
{
List><Integer> xList =new ArrayList<Integer>();
List<Integer> yList =new ArrayList<Integer>();
while ((line = br.readLine()) !=null && !line.equals(s2))
{
parts = line.split(" ");
xList.add(Integer.parseInt(parts[0]));
yList.add(Integer.parseInt(parts[1]));
}
Integer[] x = xList.toArray(new Integer[xList.size()]);
Integer[] y = yList.toArray(new Integer[yList.size()]);
// Plotting here using x and y arrays
int m = x.length;
xy[0]= Integer.parseInt(parts[5]);
xy[m+1] = Integer.parseInt(parts[6]);
for (int i = 0; i<m-1;i++)
{
xy[i+1]= x[i].intValue();
xy[i+m+1] = y[i].intValue();
// to return these values to class LinesRectsCirclesJPanel
}
}
}
}
catch (Exception exception){
exception.printStackTrace();
}
return xy;
}
}
>

