If this is Java, then, I would say change int temp = arraySequence.get(0) to int temp = arraySequence.get(largestPos) as otherwise, you keep assigning temp to the first value of the list meaning your maximum value will always only be the first value of the list.
Also, judging that you are using the get method, I am assuming this is an ArrayList, so you should be using size(), not length() in the for loop declaration.