The route continues across a mixture of cultivated fields and forests to North Java, a small hamlet located at the junction between NY 98 and Perry and Wethersfield Roads. Not far to the north is the Java–Sheldon town line, where NY 98 curves to follow a slightly northeastward alignment across Sheldon. About into Sheldon, NY 98 passes the southern end of Tonawanda Creek, the source of which is located along the west side of NY 98. The route follows the water body along the Sheldon–Orangeville town line to a junction with US 20A just inside of the town of Orangeville. NY 98 joins US 20A here, following the latter northwestward to Varysburg, a small creekside hamlet in Sheldon. At the center of Varysburg, NY 98 leaves US 20A to follow Creek Road northward through the towns of Bennington and Attica, following the base of a large valley surrounding Tonawanda Creek. Due to the terrain of the area, the routing of NY 98 is fairly isolated from the remainder of the county until it reaches the outskirts of the village of Attica. South of the village, the route comes within view of the Attica Correctional Facility, the site of the 1971 Attica Prison riot. The route enters the village shortly afterward, following High Street through the lightly developed southern half of Attica. The amount of development begins to increase at a junction with NY 354, known here as the Attica–Bennington Highway. One block later, NY 98 passes under the Norfolk Southern Railway's Southern Tier Line and joins NY 238 at Main Street. The junction of Main and High Streets marks the start of Attica's business district, which follows NY 98 and NY 238 north for two blocks along Market Street to Buffalo Street. Here, NY 238 leaves NY 98 to continue toward Darien while NY 98 remains on Market Street to the northern village and town lines, which also serves as the Wyoming–Genesee county line, though a small northernmost portion of the village of Attica, which NY 98 returns slightly, is in the town of Alexander. Batavia area Across the county line in the town of Alexander, NY 98 passes through lightly but consistently populated areas that serve as the suburbs of Batavia. As Alexander Road, the route meets US 20 at an interchange in the village of Alexander. The Alexander Road name remains through Alexander, past the CSX Transportation-owned Rochester