Java is divided into 3 major editions,
formerly known as J2SE
Java SE is a collection of Java API’s that is used for developing desktop applications including applets, swings.It contains core part of Java.
formerly known as J2EE
Java EE is a collection of Java API’s that is used for developing applications which run on servers i.e. web applications like websites.It includes jsp, servlets, beans etc.
formerly known as J2ME
Java ME is a collection of Java APIs that is used for developing applications for small devices like mobile phones, PDAs. For example mobile games, mobile applications etc.