Java and C have similar syntax. But they're unrelated.
Java was developed by Sun. Javascript was initially developed by Netscape (IIRC, but either way, it was NOT Sun), and it was named "Javascript" and some of the syntax is similar because NS wanted to take advantage of the Hot Shit at the time, which was this newfangled programming language from Sun named Java.