Java is not essential for cyber security, but programming knowledge gives you a competitive edge in the workplace. You can use it to help you analyze relevant code.