0% found this document useful (0 votes)
13 views7 pages

Java 1

The document provides an introduction to Java, detailing its history, features, and version history. Java is an object-oriented programming language known for its platform independence, security, and robustness. Key features include being simple, compiled and interpreted, portable, and multi-threaded, making it suitable for various applications from internet programming to mobile devices.

Uploaded by

ojione4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views7 pages

Java 1

The document provides an introduction to Java, detailing its history, features, and version history. Java is an object-oriented programming language known for its platform independence, security, and robustness. Key features include being simple, compiled and interpreted, portable, and multi-threaded, making it suitable for various applications from internet programming to mobile devices.

Uploaded by

ojione4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Department of Collegiate and Technical Education Diploma in CS&E

Course: OOP and Design with Java Code: 20CS43P


WEEK-1
Session No. 1 (Lecture)
Topic:
Introduction to Java, Brief history of Java, Java Features.
Introduction to Java

• Java is an object-oriented programming language and a platform.


• Java is a high level, robust and secure object-oriented programming language.
• Platform: Any hardware or software environment in which a program runs is known as a
platform. Since Java has its own runtime environment (JRE) and API, it is called platform.

Brief History of Java

• The history of Java is very interesting.


• Java was originally designed for interactive television, but it was too advanced technology for
the digital cable television industry at the time.
• Java team members (also known as Green Team), initiated this project to develop a language
for digital devices such as set-top boxes, televisions, etc.
• Since it was best suited for internet programming, Java technology was incorporated by
Netscape (Mozilla Firefox).
• The principles for creating Java programming were "Simple, Robust, Portable, Platform-
independent, Secured, High Performance, Multithreaded, Architecture Neutral, Object-
Oriented, Interpreted, and Dynamic".
• Java was developed by James Gosling, who is known as the father of Java, in 1995. James
Gosling and his team members started the project in the early '90s at Sun Micro Systems
(which is now a subsidiary of Oracle Corporation) of USA.
• Currently, Java is used in internet programming, mobile devices, games, e-business solutions,

Significant points that describe the history of Java.:

1) James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June
1991. The small team of sun engineers called Green Team.

OOP and Design with Java-20CS43P Page 1


Department of Collegiate and Technical Education Diploma in CS&E

2) Initially it was designed for small, embedded systems in electronic appliances like set-top boxes.

3) Firstly, it was called "Greentalk" by James Gosling, and the file extension was .gt.

4) After that, it was called Oak and was developed as a part of the Green project.

5) Oak is a symbol of strength and chosen as a national tree of many countries like the U.S.A., France,
Germany, Romania, etc.

6) In 1995, Oak was renamed as "Java" because it was already a trademark by Oak Technologies.

7) The team chose the name Java among the suggested names “Java”, “dynamic", "revolutionary",
"Silk", "jolt", "DNA", etc.

Java Version History:

Many java versions have been released till now.

1. JDK Alpha and Beta (1995)


2. JDK 1.0 (23rd Jan 1996)
3. JDK 1.1 (19th Feb 1997)
4. J2SE 1.2 (8th Dec 1998)
5. J2SE 1.3 (8th May 2000)
6. J2SE 1.4 (6th Feb 2002)
7. J2SE 5.0 (30th Sep 2004)
8. Java SE 6 (11th Dec 2006)
9. Java SE 7 (28th July 2011)
10. Java SE 8 (18th Mar 2014)
11. Java SE 9 (21st Sep 2017)
12. Java SE 10 (20th Mar 2018)
13. Java SE 11 (September 2018)
14. Java SE 12 (March 2019)
15. Java SE 13 (September 2019)
16. Java SE 14 (Mar 2020)
17. Java SE 15 (September 2020)
18. Java SE 16 (Mar 2021)
19. Java SE 17 (September 2021)
20. Java SE 18 (March 2022)

OOP and Design with Java-20CS43P Page 2


Department of Collegiate and Technical Education Diploma in CS&E

• Since Java SE 8 release, the Oracle corporation follows a pattern in which every even version
is released in March month and an odd version released in September month.
• As on March 2022, Java 18 is the latest release, but Java SE 17 which was released on
September 2021 is the long-term support version (LTS) after Java 11.

Java Features

• Java has become a popular and useful programming language because of its excellent features,
which play a very important role in contributing to the popularity of this language.
• The Java features are called “Java Buzzwords”.
• Sun Micro Systems officially described Java with the following list of features:
1. Simple and Familiar
2. Compiled and Interpreted
3. Platform Independent
4. Portable
5. Architectural Neutral
6. Object-Oriented
7. Robust
8. Secure
9. Distributed
10. Multi-threaded and Interactive
11. High Performance
12. Dynamic and Extensible
1. Simple and Familiar:

• Java is simple because its coding style is very clean and easy to understand.
• Java is familiar because it has a base of familiar languages like C and C++ and contains many
features of these languages.
• It removes the drawbacks, complexities, and confusing elements of C/C++.

2. Compiled and Interpreted:


• Usually, a computer language can be either compiled or interpreted.
• Java combines both these approaches, thus making a two-stage system.

OOP and Design with Java-20CS43P Page 3


Department of Collegiate and Technical Education Diploma in CS&E

• Java integrates the power of Compiled Languages with the flexibility of Interpreted
Languages.
• Java compiler (javac) compiles the java source code into the bytecode.
• Java Virtual Machine (JVM) then executes this bytecode which is executable on many
operating systems and is portable.

3. Platform Independent:
• Being platform-independent means a program compiled on one machine can be executed on
any machine in the world without any change.
• Java achieves platform independence by using the concept of the BYTE code.

4. Portable:
• Portability of Java comes from architecture-neutrality.
• Java bytecode can run on any hardware that has a compliant JVM which can convert the
bytecode according to that machine.
• In Java, the size of primitive data types is machine-independent which make Java programs
portable among different platforms such as Windows, Unix, Solaris, and Mac.
• Any changes and updates made in Operating Systems, Processors and System resources will
not enforce any changes in Java programs.

5. Architectural Neutral:
• The program written on one platform or OS is independent of other platforms or environments
and can run on any other Operating System without recompiling them.
• It is based on the ‘Write-once-run-anywhere’ (WORA) or ‘Write-once-run-everywhere’
(WORE) approach.
• This feature is very useful when we develop applets or download applications from the
Internet.

6. Object-Oriented:
• Java strongly supports the concepts of Object-Oriented Programming due to which it is called
a pure object-oriented language.
• Java supports major Object-Oriented programming features like Encapsulation, Abstraction,
and Inheritance.

OOP and Design with Java-20CS43P Page 4


Department of Collegiate and Technical Education Diploma in CS&E

• Almost everything in Java is an object.


• All programs and data live within objects and classes.

7. Robust:
• Java is capable of handling run-time errors, supports automatic garbage collection and
exception handling, and avoids explicit pointer concept.
• Java has a strong memory management system.
• It helps in eliminating errors as it checks the code during both compile and runtime.
• Exception handling identifies and removes runtime errors.
• Any runtime error whenever encountered, the program gets terminated.

8. Secure:
• Security is an important issue for any programming language as there is a threat of malicious
activities and viruses.
• Java systems not only verify all the memory access but also ensure that no threat of viruses
communicated through an applet.
• The absence of pointers in Java ensures that programs cannot give access to memory locations
without proper authorization.
• Java is a more secure language as compared to C/C++, as it does not allow a programmer to
explicitly create pointers.
• Programs run in a virtual machine sandbox – A separate environment that allows users to
execute their applications without affecting the underlying system.
• It has a bytecode verifier that checks the code fragments for any illegal code that violates the
access right.

9. Distributed:
• Java is distributed because it encourages users to create distributed applications.
• In Java, a program can be split into many parts and store these parts on different computers.
• A Java programmer sitting on a machine can access another program running on the other
machine.
• This feature is very helpful in developing large projects.

OOP and Design with Java-20CS43P Page 5


Department of Collegiate and Technical Education Diploma in CS&E

10. Multi-threaded and Interactive:


• A thread is an independent path of execution within a program, executing concurrently.
• Multithreaded means handling multiple tasks simultaneously or executing multiple portions
(functions) of the same program in parallel.
• The code of java is divided into smaller parts and Java executes them in a sequential and
timely manner.
• Multithreading has many advantages:
o Maximum utilization of resources is possible.
o It doesn’t occupy memory for each thread. It shares a common memory area.
o There is no need to wait for the application to finish one task before beginning another
one.
o There is a decreased cost of maintenance, and it is timesaving.
o It improves the performance of complex applications.

11. High Performance:


• The performance of Java is impressive for an interpreted language because of its intermediate
bytecode.
• Java provides high performance with the use of “JIT – Just In Time compiler”. This saves time
and makes it more efficient.
• The inclusion of multithreading enhances the overall execution speed of Java programs.
• Bytecodes generated by the Java compiler are highly optimized, so Java Virtual Machine can
execute them much faster.

12. Dynamic and Extensible:

• With the help of OOPs, one can add classes and add new methods to classes, creating new
classes through subclasses.
• It is highly dynamic as it can adapt to its evolving environment.
• Java even supports functions written in other languages such as C and C++ to be written in
Java programs. These functions are called “native methods”. These methods are dynamically
linked at runtime.

OOP and Design with Java-20CS43P Page 6


Department of Collegiate and Technical Education Diploma in CS&E

REVIEW QUESTIONS:
1. Which is the latest release of Java, and which one is the LTS version of Java as of today?
2. List the features/buzzwords of Java Programming Language.
3. Why Java is called a secure language?
4. Explain why Java is both compiled and interpreted?
5. What are the reasons for Java being a portable and object-oriented language?

OOP and Design with Java-20CS43P Page 7

You might also like