Driver method
public static void main ( String args [ ] ) { int pages [ ] = { 7 , 0 , 1 , 2 , 0 , 3 , 0 , 4 , 2 , 3 , 0 , 3 , 2 } ; int capacity = 4 ; System . out . println ( pageFaults ( pages , pages . length , capacity ) ) ; } }