There is a checkbox when you install Java which is checked by default. You need to remove that checkmark when installing Java.
To remove Ask, open Control Panel -> Programs and Features -> Find Ask and uninstall it. You may need to also remove/disable add-ons and plug-ins from the browsers separately.