Java was created in the early 1990s by James Gosling at Sun Microsystems to be a flexible, secure, portable programming language. It was designed to solve problems with C and C++ by allowing programs to run on any device with a Java Virtual Machine (JVM), making it "write once, run anywhere." Java uses object-oriented programming concepts and its bytecode can be safely downloaded and run on various platforms like web browsers without fear of viruses.