Help needed: read array from file and then use it

Hello. First time poster and very new to java so thanks in advance. I've been staring at this for a while and would really appreciate the help. I have a class which reads in data from a file and stores it in an array. Then the array is sorted. I am not having any trouble reading or storing the array, but when I call my sort method, I am getting a null pointer exception. My array is not making it to the next method and I cannot seem to get it there. My code is below. Again, thanks in advance for any help.

import java.io.*;

import java.util.*;

public class SortFractions

{

Fraction [] A; //array of Fractions to be sorted

int n; //size of the array

final int MAX;

File file;

public SortFractions(File input,int m)

{

file = input;

MAX = m;

readArray();

selectionSort();

}

private void readArray()

{

String line;

Scanner scanner;

int numerator,denominator;

try

{

scanner = new Scanner(file);

Fraction [] A = new Fraction[MAX];

try

{

while(scanner.hasNext())

{

numerator = scanner.nextInt();

denominator = scanner.nextInt();

A[n] = new Fraction(numerator, denominator);

n++;

}//end of input reads

scanner.close();

}

catch(InputMismatchException e)

{

}

}

catch(FileNotFoundException exception)

{

System.out.println("The file " + file.getAbsolutePath() + "was not found.");

System.exit(0);

}

}

private void selectionSort()

{

A = new Fraction[MAX];

System.out.println("n is equal to: " +n);

for (int i = 0; i < n; i++)

System.out.println("Array: " + A[i]);

int index;

int smallestIndex;

int minIndex;

Fraction temp;

for (index = 0; index < n; index++)

{

smallestIndex = index;

for (minIndex = index + 1; minIndex < n; minIndex++)

if(A[minIndex].compare(A[smallestIndex],A[minIndex]) > 0)

smallestIndex = minIndex;

temp = A[smallestIndex];

A[smallestIndex] = A[index];

A[index] = temp;

System.out.print(A[index]+" ");

}

}