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 Boise from the ocean
How far is Solana Beach from the ocean
How far is Baltimore from the ocean
How far is Hershey from the ocean
How far is Bellingham from the ocean
How far is Mendocino from the ocean
How far is Fayetteville, NC from the ocean
How far is Springfield, MO from the ocean
How far is Stinson Beach from the ocean
How far is Chefchaouen from the ocean