A lot of budget travelers to Indonesia prefer to spend more time in the Java island when compared to the other islands mainly because of its superior public transport infrastructure and the ability to travel long distances for a very small price. Trains and buses forms the bulk to the public transport system while there are taksi (taxi), ojek (motorcycle taxi), becak (3 wheeler cycle rickshaw), bajai (3 wheeler auto rickshaw), angkot (mini van) and more. Out of these, the trains offer the most comfort and are ideal to commute long distances.
During my last 3 weeks in Java, I have taken the train 4 times. I took the Executive class from Jakarta to Yogyakarta, the Executive class again from Yogyakarta to Malang, the Economy class from Malang to Banyuwangi and the Bisnis Class from Banyuwangi to Surabaya. For me, all classes were comfortable even though each journey was a minimum of 6 hours.
The thing to understand with the trains in Indonesia is that the cost of the trains vary with train type and class type. The Executive trains are the fastest, but also cost the most. All the compartments on the Executive trains are the Executive class, which is the highest class. There are no sleeper berths on the trains in Indonesia. All of them are seat type like the airplanes.
The Executive class has individual seats with push back option, pillow, blanket, and lots of leg room (I am a 191 cm guy and I was very comfortable). The Executive compartments are completely air-conditioned. The Bisnis class is also air-conditioned, but the seats are shared and the leg room is slightly lesser. Pillows are provided upon request. There are 2 types of economy class. One is economy with AC and the other is Economy with fan. Both of them are shared seats with very less leg room. Pillows are provided in this class too, but for a price. The cost decreases as you move from Executive to Bisnis to Economy AC to Economy.
Most of the trains have an attached pantry car that serves food. In the Executive trains, pantry attendants come to take personalized food and beverage orders, but in other trains, they just sell the wares. In economy trains, local vendors get into the train at each station and sell the wares. All the train compartments have attached toilets that are always maintained very well. While most of it is squat style toilets, some Executive trains have WC style toilets too.
The Executive trains take the least time to travel between 2 destinations because they either don’t stop at all destinations or stop only for a very brief period of time. They also get premium treatment over the other trains. The economy trains are much slower, but they stop at stations where the Executive trains do not stop. They get much longer than the Executive trains to ply between 2 destinations.
The thing to keep in mind is that in Indonesia, the Executive trains leave from a different station, while the economy ones leave from a different one. To ensure you have a comfortable train journey, carry a jacket and/or blanket with you if you are traveling in an air-conditioned compartment. The trains in Indonesia love to keep the AC very cold. Also, buy water and food as required from a supermarket before entering the train. Even though food is available on the train, it may or may not be fresh and is slightly more expensive than the supermarket.
The best thing about the trains is the ease of booking. One can either book the tickets directly at the train station, online at Kereta API train booking website and/or book at the nearest Indomaret supermarket (you pay 7,500 rupiah more for using this option). Unless it is a holiday, you should be able to book a train ticket one day in advance. Sometimes you can also get the ticket at the train station just before the scheduled departure of the train.