The code below reads from a file. The file contains around 3000 lines with 193 digits separated by space in each line.
void read(){
String fileName = "ocr_train.txt";
String line = null;
float[] vertices = new float[200];
try {
// FileReader reads text files in the default encoding.
FileReader fileReader = new FileReader(fileName);
// Always wrap FileReader in BufferedReader.
BufferedReader bufferedReader = new BufferedReader(fileReader);
while((line = bufferedReader.readLine()) != null) {
//System.out.println(line);
String[] parts = line.split(" ");
for (int i = 0; i < parts.length; i++){
if(parts[i] != null && parts[i].length() > 0){
vertices[i] = Float.parseFloat(parts[i]);
}
}
Points p = new Points(vertices);
System.out.println(p);
full.add(p);
}
bufferedReader.close();
}
Here, when I try printing p, it gives me values like Points@10bf683, Points@d322f5 etc What is wrong with this step?