i know java and javascript only have the name in common and are not
related languages.
however are applets the same as a javascript thats executable in a
html-document?
No, not even close. An example of an applet is AcrossLite, which lets
you solve a crossword puzzle within a web page. It draws the diagram,
displays the proper clue, lets you navigate around the puzzle, etc.
Javascript generally is called to cause some non-standard behavior in
an HTML page. For example, I have pages that collect phone numbers. I
have three boxes which take 3, 3, and 4 digits. I use Javascript to
make the cursor jump to the second box when the first is filled, then
to the third when the second is filled. You can use it to make parts
of the page appear or disappear, change type size, style, or color, or
move around among many other things. Google Maps uses very advanced
Javascript to animate the maps.
java was first created to do applets right? but i read somewhere noone
writes java-applets anymore.
Well, Java was first created to do embedded programming on many
different processors. It turned out to be a very good fit for running
applets in web pages on many different platforms. There are still many
Java applets being used.
then what do people use java for?
A major use nowadays is system-side programming using J2EE.