What is the difference between java and jsp?

前端 未结 4 1233
-上瘾入骨i
-上瘾入骨i 2021-01-05 14:15
  1. are java applets and jsp pages written in the same langue (java)?
  2. is java a language?
  3. Is java used for web or other things as well?

an

4条回答
  •  忘掉有多难
    2021-01-05 14:39

    1. In a way, yes. Java applets are just a special case of Java classes, specifically they are subclasses of the Applet class. JSP is a combination of XML tags and Java code that is dynamically compiled into Java classes by the server.

    2. Yes, Java is a language, but the name also refers to the entire Java platform including the class library and virtual machine.

    3. Java wasn't designed with any specific purpose in mind, and indeed you will find all kinds of programs written in Java. Of course, it does enjoy a good share of the web application market and probably more than any other general-purpose language.

提交回复
热议问题