Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

The HISTORY of

JAVA
Java 1.0 (1996)
Birth of JAVA First official release of Java.
(1991-1995) Introduced the "applet" for web browsers.
Created by James Gosling at Sun Microsystems. "Write Once, Run Anywhere" (WORA) concept.
Originally called "Oak." Java Platform, Enterprise
Aimed at developing software for consumer Edition (Java EE)
electronic devices. Introduced for enterprise-level applications.
Java 2 (1998) Includes Java Servlet, JSP, EJB, and more.
Major update with enhanced libraries and features. Facilitated the development of web applications.
Introduced Swing GUI toolkit. Oracle Acquires Sun
Expanded Java's reach and adoption Microsystems (2010)
Java Open-Sourced
Oracle Corporation acquired Sun
(2006) Microsystems, becoming the steward of
Java was released under the GNU Java.
Java 9-11 (2017-2018)
General Public License (GPL).
Introduced modules in Java 9.
This led to the creation of OpenJDK.
Java 10 and 11 brought incremental
Java 8 (2014)
Major release with lambdas, the Stream improvements and features.
API, and the java.time package. Project Loom &
Improved performance and language Valhalla
enhancements. Ongoing projects to improve concurrency
Java 12+ (2019-2021) and memory efficiency.
Introduced new features like switch
Future of Java
expressions (Java 12) and records (Java 16).
Regular release cadence (every 6 months) Continues to evolve with new features
introduced. and improvements.
Java Today Remains a critical technology in
Widely used for web development various industries.
(Java Spring), Android app
development, and more.
Remains a popular and versatile
programming language.

Oracion, Mark Gerlex V.


Bs infotech 201B
Java Functions
A function in Java is a reusable block of code that performs a specific task.
It helps in breaking down a program into smaller, manageable parts

Syntax Return
Statement:
returnType functionName(parameters)
The return statement is used to
{
return a value from the function.
// Code to be executed
Functions with void return type
return result; don't return a value.
}
Function
Overloading:
Java allows defining multiple
Parts of a Function: functions with the same name
returnType: Specifies the data type of the but different parameter lists.
value returned by the function. Recursion:
functionName: The name of the function A function can call itself,
for calling it. creating a recursive function.
parameters: Input values passed to the Requires a base case to
function. prevent infinite recursion.
return: The value returned by the function Built-in
(optional).
Functions
Function Declaration Java provides a standard
vs. Definition: library with built-in
functions for common tasks
Declaration: Tells the compiler about the
function's name and signature. Benefits of
Definition: Contains the actual code that Functions:
the function will execute. Reusability
EXAMPLE Modularity
Code organization
int add(int a, int b) { Debugging and maintenance
return a + b; Best Practices:
} Use meaningful function names.
Keep functions small and focused.
Calling a Comment your code to explain complex functions.
Function:
Use the function name with Oracion, Mark Gerlex V.
appropriate arguments. Bs infotech 201B
Example: int result = add(5, 3);

You might also like