Unit Name: OOP II
Unit Code: CCS 227
Prerequisites: OOP I
Lecture: P. Muturi
Instructions:
1. Attempt ALL the questions
Duration: I Hour
____________________________________________________________________________
1. Explain any three features of Java programming language that
make it popular.
[3 Marks]
√ Platform independence - Java code can be compiled into a platform-
independent bytecode format, which can be executed on any system
that has a Java Virtual Machine (JVM) installed. This means that a
Java program can run on any operating system, making it highly
portable and flexible.
√ Object-oriented programming - Java is built around the concept of
objects. This allows developers to write modular, reusable code that
is easier to maintain and extend.
√ Memory management - JVM automatically manages the allocation
and deallocation of memory. This helps to prevent memory leaks and
other common memory-related issues. Java's garbage collector frees
developers from having to worry about memory management, which
can be a time-consuming and error-prone process in other
languages.
, 2. Java language is distributed in three editions. Outline and
differentiate them
[3 Marks]
√ Java Standard Edition (Java SE) - Java SE is the most commonly
used edition of Java, and it is designed for developing desktop and
server-side applications. It includes a wide range of features,
including the Java Development Kit (JDK), which includes tools such
as a compiler and a debugger. Java SE also includes the Java
Runtime Environment (JRE), which is necessary to run Java
applications on any machine that has a JVM installed.
√ Java Enterprise Edition (Java EE) - Java EE is an extension of Java
SE, and it is designed for developing web-based enterprise
applications. It includes a set of APIs and specifications that make it
easier to develop, deploy, and manage large-scale applications. Java
EE includes features such as servlets, JavaServer Pages (JSP),
Enterprise JavaBeans (EJB), and Java Persistence API (JPA).
√ Java Micro Edition (Java ME) - Java ME is a version of Java that is
designed for developing applications for small, embedded devices
such as mobile phones and smart cards. Java ME is a lightweight
version of Java, with a smaller footprint than Java SE or Java EE. It
includes a set of APIs that are optimized for small devices, such as
the Mobile Information Device Profile (MIDP) and the Connected
Limited Device Configuration (CLDC).
3. JDK, JRE and JVM are common acronyms in Java programming.
Write their full names and explain the role each plays.
[3 Marks]
√ JDK - JDK stands for Java Development Kit. It is a software
development kit that includes all the tools and utilities necessary to
develop, test, and deploy Java applications. The JDK includes a