It's safe to delete Java as long as you aren't using it.

Java is just as safe as any other programming language. Maybe even a little safer.

It is insane to go around running every application you come across on the internet. Especially if you don't even know you're doing it. It doesn't matter whether the program comes to you as an embedded applet on a web page, or come as a .exe attachment to an email message. It doesn't matter if it's written in C or C# or Java or Assembler, if you didn't download it on purpose from a reputable developer to meet a specific need, it has no business running on your computer.

As a special case of that, it is insane to tell your browser it has permission to download and run any application that a website offers. For example, ActiveX was one of Microsoft's more idiotic ideas. It allowed a website to download compiled native code to your machine and run it there, where it had the full run of your system. The intent was to allow fancier graphics than your browser natively allowed. The unintended consequence was that it had unrestricted ability to install malware on your system.

Java was widely believed to be immune to these problems. An embedded Java application can indeed provide fancier graphics than your browser natively supports, but has no direct access to your filesystem and cannot affect anything outside that web page's sandbox.

At least in theory. Flaws were found in the JRE (Java Runtime Environment) that did allow carefully crafted Java applets to break out of the sandbox and gain full access to your computer.

The headlines shouted "JAVA UNSAFE!!!" They should have said, "On reflection, it turns out that Java's security is almost but not quite as bullet-proof as previously believed."

But remember, when you download an application to run it on your computer, it has full access to everything. Doesn't matter what language it's written in. The fact that you installed it on your computer is what gives it that access. (Unless it's from the App Store. App Store applications are required to be sandboxed.) Most apps you download onto your Mac will be written in Objective C and/or C++, but a few popular apps (Minecraft, for example) are written in Java. From a security standpoint, it makes absolutely no difference.

If you remove Java from you system, you'll break any apps that use it. They may be apps you know and love.

If you disallow Java in your browser (which is not the same thing), you'll only break a few websites. And fewer every day, since the websites that still use Java are moving away from it to soothe users who panicked over the scary headlines. Instead, they're using HTML 5 and other features of newer browsers that weren't available widely or at all when the original decision to use Java was made.

I recommend disallowing Java in your browser. I have no opinion whether you should remove it from your system. If you do keep it, keep it up to date.

Java has two faces, the JRE and the JDK. JRE (Java Runtime Environment) is all you need to run Java programs written elsewhere. JDK (Java Development Kit) is what you need to write your own Java programs. If you didn't already know this, you don't need JDK. When you go to Oracle (the current owner of Java) to check for downloads, be sure to check which of these they're talking about. (JDK without JRE is pretty much useless, so downloads typically will or will not be labeled as "including JDK".)