6
  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?

and what can it be compared to? i.e (c c++ c# php asp)

i really have no idea what it is

Famver Tags
  • 1,988
  • 2
  • 16
  • 18
  • Related questions: [What is the difference between JSF, Servlet and JSP?](http://stackoverflow.com/questions/2095397/what-is-the-difference-between-jsf-servlet-and-jsp) and [What is the mainstream Java alternative to ASP.NET and PHP?](http://stackoverflow.com/questions/2556553/what-is-the-main-stream-java-alternative-to-asp-net-php). – BalusC Jan 02 '11 at 12:22

4 Answers4

5
  1. Yes
  2. Yes
  3. It's a general purpose language, it's used for just about everything

Java is most similar to C#, they're both syntactically similar and get compiled to an intermediate language rather than native code (for Java, it runs on the Java Virtual Machine, for C# it's the Common Language Runtime). JSP is most similar to ASP.

Java's another programming language, it's also the world's most popular language. Try the wikipedia page for it

Rafe Kettler
  • 75,757
  • 21
  • 156
  • 151
  • 1
    I doubt if Java is the world's most popular language given that there are more questions tagged with c# on stackoverflow. :P – gigadot Jan 02 '11 at 06:47
  • 6
    @gigadot according to TIOBE and a number of others, it is the world's most popular language. It's interesting that SO has more C# questions, but I think that's because the site was founded by C-Sharpies like Jeff Atwood, who brought along their fans, blog readers, etc. – Rafe Kettler Jan 02 '11 at 06:51
  • "World's most popular language" is hardly a quantifiable concept. – dave Jan 02 '11 at 07:16
  • JavaServer Pages are written using a mixture of Java and usually HTML or XML. – dave Jan 02 '11 at 07:20
  • Thank you very much guys. I'm learning more and more every day – Famver Tags Jan 02 '11 at 08:10
  • @Rafe Kettler: A simple clarification, JavaServer Page source files are interspersed with HTML and or XML alongside Java code. – dave Jan 03 '11 at 19:29
3

Java applets are written using the Java programming language. JavaServer Pages (JSP) are programmed using a mixture of "scriptlet elements" (Java code) and "markup" (usually HTML or XML) to serve data-driven ("dynamic") web pages.

Java is a high-level programming language.

Java is used to write applications for a variety of systems, including NASA vehicles for the exploration of Mars, business-oriented applications and data-driven web pages.

Java can be compared to programming languages such as Microsoft's C# (modeled after Java) or Objective-C (an object-oriented extension to C) due to the fact that programs written in Java, C# and Objective-C generally depend on a Virtual Machine installed on top of the operating system to execute.

JavaServer Pages are the Java community's answer to PHP and Microsoft's ASP.

dave
  • 559
  • 3
  • 12
  • Objective-C does not run on a VM. – Rafe Kettler Jan 02 '11 at 06:56
  • The current version of Objective-C (2.0) requires a thin virtual machine, or "runtime" in Objective-C parlance, to handle advanced features such as dynamic typing, posing and rudimentary garbage collection. Please check your references before posting. http://en.wikipedia.org/wiki/Objective-C#Analysis_of_the_language – dave Jan 02 '11 at 07:12
  • I read the same thing, and the Obj.-C runtime is hardly a VM. It's an incredibly thin layer of abstraction over hardware and most code doesn't go through it. It doesn't deserve to be lumped together with entirely VM languages like C# and Java. – Rafe Kettler Jan 02 '11 at 07:22
  • Conceptually speaking, and in practice, it is a virtual machine, albeit a thinner one. Features provided by Objective-C's thin virtual machine, such as dynamic typing, posing and garbage collection place Objective-C architecturally nearer to Java and C# than to older statically typed, procedural languages. – dave Jan 02 '11 at 07:31
1
  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.

casablanca
  • 69,683
  • 7
  • 133
  • 150
-3

Simply Java is a Programming language and JSP is a scripting language (server side)

Java can be used in web sites as Applets JSP is designed to web applications

Java is inherited from C programming language so it has the same syntaxes and concepts like it

Sudantha
  • 15,684
  • 43
  • 105
  • 161