This is a simple railway reservation program in JAVA to: Book ticket Cancel ticket Display reservation chart Search passenger number…