Instead of reading my file, it says match$Match@1d58aae and so on. What is wrong within my codeee?import java.io.BufferedReader; import java.io.FileReader; import java.util.ArrayList; import java.util.List; public class match { private static class Match { private int HomeScore = 0; private int AwayScore = 0; private String HomeTeam; private String AwayTeam; public void setAwayScore(int AwayScore) { // TODO Auto-generated method stub this.AwayScore = AwayScore; } public void setHomeScore(int HomeScore) { // TODO Auto-generated method stub this.HomeScore = HomeScore; } public void setAwayTeam(String AwayTeam) { // TODO Auto-generated method stub this.AwayTeam = AwayTeam; } public void setHomeTeam(String HomeTeam) { this.HomeTeam = HomeTeam; } } public static void main(String[] args) throws Exception{ final List<Match> matches = new ArrayList<Match>(); final BufferedReader BufferedReader = new BufferedReader(new BufferedReader(new FileReader("results.txt"))); //read the list results file int CountValid = 0; int CountInvalid = 0; int CountGoals = 0; if (BufferedReader != null){ //if not equal to null String text; while((text = BufferedReader.readLine()) != null ){ String[] split = text.split(":"); //split by : marks if (split.length >= 4) { //split the file by : final Match match = new Match(); match.setHomeTeam((split[0]).trim()); //this sets the first part of home team name match.setAwayTeam((split[1]).trim()); //this sets the second part of away team name match.setHomeScore(Integer.parseInt(split[2].trim())); //this sets the third part of home team name match.setAwayScore(Integer.parseInt(split[3].trim())); //this sets the fourth part of away team name matches.add(match); //adds all parts to the match CountValid++; CountGoals+= match.HomeScore + match.AwayScore; //adds home and away goals } if (split.length <= 3) { //if 3 or less CountInvalid++; // adds invalid count } //BufferedReader.close(); } if (!matches.isEmpty()) { for (final Match match : matches){ if(match.HomeTeam.length() == 0) //if home team has 0 characters {CountInvalid ++;CountValid --; CountGoals = CountGoals -(match.HomeScore + match.AwayScore); } else if(match.AwayTeam.length() ==0 ) {CountInvalid ++; CountValid--; CountGoals = CountGoals -(match.HomeScore + match.AwayScore); } else { System.out.println(match.toString()); } } System.out.println("The Total Number of Goals was" +CountGoals); System.out.println("The Total Number of Valid games were" +CountValid); System.out.println("The Total Number of invalid games were" +CountInvalid); } } } }