Yogyakarta is about 38 km from the ocean.
If you're driving to a town near the beach or coastline, you could try Borobudur.
How far is Cannon Beach from the ocean
How far is Mount Shasta, CA from the ocean
How far is Jacksonville from the ocean
How far is Princeville from the ocean
How far is Taos from the ocean
How far is Coral Gables from the ocean
How far is Charlottesville from the ocean
How far is Omaha from the ocean
How far is Oakland from the ocean
How far is Sihanoukville from the ocean