Under the Whyte notation for the classification of steam locomotives, 4-8-2 represents the wheel arrangement of four leading wheels, eight powered and coupled driving wheels and two trailing wheels. This type of steam locomotive is commonly known as the Mountain type.

The first of eighteen X class 4-8-2 De Glehn compound locomotives, designed by A. L. Beattie, the Chief Mechanical Engineer of the New Zealand Railways Department (NZR) between 1900 and 1913, was built by the NZR's Addington Railway Workshops in Christchurch in 1908. The first locomotive in the world to be designed and built as a 4-8-2 tender locomotive, it was designed to haul heavy freight trains on the newly completed mountainous central section of the North Island Main Trunk Railway. One member of the pioneering X class survives and is currently located at the depot of the Feilding and District Steam Rail Society.

Between 1940 and 1956, 91 J and JA class locomotives entered service. Of these, 56 were built by North British Locomotive Company and 35 by the Hillside Railway Workshops in Dunedin. These locomotives survived in service until 1971 and were the last in-service steam locomotives on the NZR. Ten have been preserved.

More Info: en.wikipedia.org