It11 - Module1
It11 - Module1
RATIONALE
In this course the student will gain a broad understanding of modern computer
programming. The student will acquire introductory skills in problem analysis, solution design,
and program construction. Through practical programming activities, the student will gain an
appreciation of the nature and history of computer programming.
OU
SE SPECIFIC LEARNING OUTCOMES
OD
LE LO1: Students are oriented on the course description, grading system, course requirements, and
class protocols.
LO2: Identify and research a wide variety of career fields and opportunities.
LO3: Evaluate the environmental fit of a variety of work settings and roles.
LO5: Articulate their transferable, liberal arts, graduate school and work-related skills.
ACTIVATING CONTENT
Activity
● The teacher will introduce the School's Mission and Vision and the College Organization.
● The teacher will discuss the Java Programming Language and the History of Java.
● By the end of the lecture, the students will be able to create a simple Java syntax.
Content/Discussion
1
MITZI CLYDE S. TURTOR
MODULE WEEK NO.1
WHAT IS JAVA?
A cross-platform, high-level language called "Java" was created by Sun Micro Systems under the
direction of James Gosling. The initial version of this language, Java 1.0 [J2se], was released in
1995. Since then, Java has progressed significantly, and we are currently working on Java 8.
Aside from this, a number of ava versions, including J2ee (java for enterprise applications) and
J2me (ava for mobile applications), have also been produced. Ava was made available as open-
OU source software by Sui in 2006. This restructuring process was finished in 2007.
SE
OD HISTORY OF JAVA
LE
Java programming language has an interesting history that spans several decades. Here's a brief
overview:
Early Origins (1991-1995): The story of Java begins with James Gosling, Mike Sheridan,
and Patrick Naughton, who were working at Sun Microsystems (now owned by Oracle
Corporation). They started a project called "Green" in 1991, aiming to develop a language
for programming consumer electronics. The team recognized the need for a platform-
independent language due to the diversity of devices, and this led to the birth of Java.
Release of Java (1995): The first official version of Java, Java 1.0, was released to the
public in May 1995. This version included the core features of the language, such as its
object-oriented nature and its "Write Once, Run Anywhere" (WORA) capability, enabled by
the use of the Java Virtual Machine (JVM).
Platform Independence and Applets (Late 1990s): One of Java's early successes was
its use in web applets, which were small Java programs that could be embedded within
web pages. This allowed interactive content to be delivered to users across different
platforms and browsers. However, applets eventually lost popularity due to security
concerns and performance issues.
Introduction of Java 2 (1998): Java 2, also known as Java 1.2, was a significant
milestone. It introduced several important features, including the Swing GUI toolkit for
creating graphical user interfaces, the Collections Framework for data structures, and the
Abstract Window Toolkit (AWT) improvements.
Enterprise Java (Early 2000s): Java gained popularity in enterprise development due to
its robustness and platform independence. Technologies like Enterprise JavaBeans (EJB)
and the Java 2 Enterprise Edition (J2EE) platform became the foundation for building
2
MITZI CLYDE S. TURTOR
MODULE WEEK NO.1
large-scale applications.
Open Sourcing Java (2006): In November 2006, Sun Microsystems released the Java
platform's source code under the GNU General Public License (GPL) as the OpenJDK
project. This marked a significant step toward making Java more open and accessible to
the community.
Java's Evolution (2010s): The Java language continued to evolve with new features and
enhancements. Java 8 (2014) introduced lambda expressions, the Stream API, and the
java.time package for modern date and time handling. Java 9 (2017) brought modularity
with the introduction of the Java Platform Module System (JPMS). Subsequent releases
continued to add new features and improvements.
Java and Oracle (2010s): Oracle acquired Sun Microsystems in 2010, and concerns
arose within the developer community about the future of Java's open nature. However,
Java's development and open-source projects continued under the stewardship of Oracle
and the broader community.
Java 11 and Beyond (2018-Present): Java 11, released in 2018, marked the next Long-
Term Support (LTS) version after Java 8. It focused on stability, and performance
improvements, and introduced the module system on a broader scale. Subsequent
OU versions have continued to introduce new features and enhancements while maintaining
backward compatibility.
SE
OD Throughout its history, Java has played a significant role in various software domains and
continues to be widely used in diverse application areas. Its strong emphasis on portability,
LE reliability, and community support has contributed to its enduring popularity.
The difference between the way Java and other programming languages worked was
revolutionary. Code in other languages is first translated by a compiler into instructions for a
specific type of computer. The Java compiler instead turns code into something called Bytecode,
which is then interpreted by software called the Java Runtime Environment (JRE), or the Java
virtual machine. The JRE acts as a virtual computer that interprets Bytecode and translates it for
the host computer. Because of this, Java code can be written the same way for many platforms
(“write once, run anywhere”), which helped lead to its popularity for use on the Internet, where
many different types of computers may retrieve the same Web page.
In this tutorial, you will learn to write "Hello World" program in Java.
A "Hello, World!" is a simple program that outputs Hello, World! on the screen. Since it's a very
simple program, it's often used to introduce a new programming language to a newbie.
3
MITZI CLYDE S. TURTOR
MODULE WEEK NO.1
class HelloWorld {
System.out.println("Hello, World!");
Output
OU Hello, World!
SE
How Java "Hello, World!" Program Works?
OD // Your First Program
LE In Java, any line starting with // is a comment. Comments are intended for users reading the code
to understand the intent and functionality of the program. It is completely ignored by the Java
compiler (an application that translates Java programs to Java bytecode that computer can
execute). To learn more, visit Java comments.
In Java, every application begins with a class definition. In the program, HelloWorld is the name of
the class, and the class definition is:
class HelloWorld {
... .. ...
For now, just remember that every Java application has a class definition, and the name of the
class should match the filename in Java.
This is the main method. Every application in Java must contain the main method. The Java
compiler starts executing the code from the main method.
How does it work? Good question. However, we will not discuss it in this article. After all, it's a
basic program to introduce Java programming language to a newbie. We will learn the meaning
of public, static, void, and how methods work? in later chapters.
4
MITZI CLYDE S. TURTOR
MODULE WEEK NO.1
For now, just remember that the main function is the entry point of your Java application, and it's
mandatory in a Java program. The signature of the main method in Java is:
... .. ...
System.out.println("Hello, World!");
The code above is a print statement. It prints the text Hello, World! to standard output (your
screen). The text inside the quotation marks is called String in Java.
Notice the print statement is inside the main function, which is inside the class definition.
SE
OD
Every valid Java Application must have a class definition that matches the filename (class name
LE and file name should be same).
The compiler executes the codes starting from the main function.
Don't worry if you don't understand the meaning of class, static, methods, and so on for now. We
will discuss it in detail in later chapters.
Setting Application
5
MITZI CLYDE S. TURTOR
MODULE WEEK NO.1
Establishing Feedback
Please direct yourself to our official Facebook Page and tell me your feedback on this week’s module.
SE
OD
LE
6
MITZI CLYDE S. TURTOR