Duke, Oak's smartagent that would later become the Java mascot
In 1985, Sun Microsystems was attempting to develop a new technology for programming next generation smart appliances, which Sun expected to be a major new opportunity.
The team originally considered using C++, but rejected the idea for several reasons (see Java history).
Initially, Gosling attempted to modify and extend C++ but soon abandoned that in favor of creating a new platform called Green and an entirely new language, which he called Oak, after the oak tree that stood just outside his office.[1]
By the summer of 1992, they were able to demonstrate portions of the new platform including the Green OS, the Oak language, the libraries, and the hardware. Their first attempt, demonstrated on September 3, 1992, focused on building a PDA device named Star7[1] which had a graphical interface and a smart agent called "Duke" to assist the user.
Oak was the basis for what Java 1.0 became later, but there were also some differences:[4][5]
Several concepts were planned in the Oak specification but were not implemented in the original language because of time constraints:
While the Oak default access level was the same as Java's (default) package private access level, it was called "private". Oak did not have an equivalent to Java's private access modifier.
It was possible by the unprotect keyword to write code that would not signal asynchronous exceptions.
There was some support for Design by Contract:[8] Oak had assertions whereby Class variable could be constrained and the constraints were enforced at entry and exit of every public and protected method of the class. Methods could also have their own pre-conditions and post-conditions, which were inherited but not redefinable in a subclass.[4][9]
^Murphy, Kieron (4 October 1996). "So why did they decide to call it Java?". JavaWorld. Retrieved 2020-07-15. 'The lawyers had told us that we couldn't use the name "OAK" because [it was already trademarked by] Oak Technologies,' said Frank Yellin, a senior engineer at Sun. 'So a brainstorming session was held to come up with ideas for a new name.'