Differences Between "Java -Cp" and "Java -Jar"

What is the difference between java and core java?

"Core Java" is Sun's term, used to refer to Java SE, the standard edition and a set of related technologies, like the Java VM, CORBA, et cetera. This is mostly to differentiate from, say, Java ME or Java EE.

Also note that they're talking about a set of libraries rather than the programming language. That is, the underlying way you write Java doesn't change, regardless of the libraries you're using.

Is there any difference between Oracle's Java and Java used in Android?

There is no difference between Java and Oracle's Java . It's called Oracle Java because Oracle owns Java. You can develop the Android application using Core Java.

If you know Core Java then you just need to learn the Android SDK to develop Android applications.

Refer this site for learning Android: Android Developer Site .

Difference between Java SE & Java EE

Java SE (standard edition) is just the normal specification of Java. Java EE (enterprise edition) is Java with all sorts of add-ons for enterpris-y things like:

  • Enterprise JavaBeans;
  • Java Persistence API;
  • Servlets;
  • Java Server Pages.

(not an exhaustive list, more detail available on Wikipedia). You generally get Java SE when you download the SDK (for development) or JRE (for running Java applications).

On the other hand, you generally get all the Java EE goodies when you start using IBM Websphere Application Server, or JBoss, or another enterprise-class application server.

You can download the Oracle Java EE 6 SDK here. The JSR for Java EE 6 is here.

Difference between Java SE/EE/ME?

Java SE = Standard Edition. This is the core Java programming platform. It contains all of the libraries and APIs that any Java programmer should learn (java.lang, java.io, java.math, java.net, java.util, etc...).

Java EE = Enterprise Edition. From Wikipedia:

The Java platform (Enterprise Edition) differs from the Java Standard
Edition Platform (Java SE) in that it adds libraries which provide
functionality to deploy fault-tolerant, distributed, multi-tier Java
software, based largely on modular components running on an
application server.

In other words, if your application demands a very large scale, distributed system, then you should consider using Java EE. Built on top of Java SE, it provides libraries for database access (JDBC, JPA), remote method invocation (RMI), messaging (JMS), web services, XML processing, and defines standard APIs for Enterprise JavaBeans, servlets, portlets, Java Server Pages, etc...

Java ME = Micro Edition. This is the platform for developing applications for mobile devices and embedded systems such as set-top boxes. Java ME provides a subset of the functionality of Java SE, but also introduces libraries specific to mobile devices. Because Java ME is based on an earlier version of Java SE, some of the new language features introduced in Java 1.5 (e.g. generics) are not available.

If you are new to Java, definitely start with Java SE.

Is there any Difference between JAVA and JSP

In short,

Java is object oriented computing language which can do almost anything you want to do.

JSP is technology based on java, JSP processor generates webpages using java language.

What is the main difference in object creation between Java and C++?

In addition to other excellent answers, one thing very important, and usually ignored/forgotten, or misunderstood (which explains why I detail the process below):

  • In Java, methods are virtual, even when called from the constructor (which could lead to bugs)
  • In C++, virtual methods are not virtual when called from the constructor (which could lead to misunderstanding)

What?

  • Let's imagine a Base class, with a virtual method foo().
  • Let's imagine a Derived class, inheriting from Base, who overrides the method foo()

The difference between C++ and Java is:

  • In Java, calling foo() from the Base class constructor will call Derived.foo()
  • In C++, calling foo() from the Base class constructor will call Base.foo()

Why?

The "bugs" for each languages are different:

  • In Java, calling any method in the constructor could lead to subtle bugs, as the overridden virtual method could try to access a variable which was declared/initialized in the Derived class.

Conceptually, the constructor’s job is to bring the object into existence (which is hardly an ordinary feat). Inside any constructor, the entire object might be only partially formed – you can know only that the base-class objects have been initialized, but you cannot know which classes are inherited from you. A dynamically-bound method call, however, reaches “forward” or “outward” into the inheritance hierarchy. It calls a method in a derived class. If you do this inside a constructor, you call a method that might manipulate members that haven’t been initialized yet – a sure recipe for disaster.

Bruce Eckel, http://www.codeguru.com/java/tij/tij0082.shtml

  • In C++, one must remember a virtual won't work as expected, as only the method of the current constructed class will be called. The reason is to avoid accessing data members or even methods that do not exist yet.

During base class construction, virtual functions never go down into derived classes. Instead, the object behaves as if it were of the base type. Informally speaking, during base class construction, virtual functions aren't.

Scott Meyers, http://www.artima.com/cppsource/nevercall.html



Related Topics



Leave a reply



Submit