100% found this document useful (1 vote)
343 views16 pages

Introduction to Java Programming

Java is an object-oriented programming language that is high-level, robust, secure, portable and interpreted. It is used for both desktop and mobile applications as well as enterprise applications.

Uploaded by

h82280401
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
343 views16 pages

Introduction to Java Programming

Java is an object-oriented programming language that is high-level, robust, secure, portable and interpreted. It is used for both desktop and mobile applications as well as enterprise applications.

Uploaded by

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

 It is an object oriented programming language.

 It is a high level programming language which helps us in writing

commands (codes) to make a computer to do a particular task.

 It is a first programming language which provide the concept of

writing programs that can be executed using the web.

 It is a mediator between you and computer.

 Write Once Run Anywhere (WORA).


OOPS(object oriented programming
language) Concept:
HISTORY

It was developed by james gosling and sun microsystem in 1991.

In 1995, its publically released 1.0 version.

Its starting name was oak.

It was purchased by oracle company in 2010.


working
• First of all source code is compiled then program conver it into
intermediate version called byte-code which is readable by human
beings.
• Bytecode read by special software called java interpretor which
translate into machine friendly language.
• Finally, computer read translate code & perform a particular task.
features
• It is a simple and secure.
• It is a portable.
• Object oriented.
• It is a Architecture neutral.
• It is robust .
• Java is interpreted and compiled.
• It is also Multi-Threaded.
Uses
• According to the sun, 3 billion devices run java.
• It is use for developing software that run on on mobile and desktop servers.
• It is used in desktop applications.
• Create android apps.
• Applications of smart phones.
• Enterprise applications.
• Embedded system.
• Games.
• Robotics.
Java program translation
Java Virtual Machine (JVM)

• Java virtual machine is the like usual computer which translate high
level language into machine language.

• Just like that java virtual machine also translates bytecode into
machine language.

• JVM are available for many hardware and software platform.


Java- program development phase
Java is independent language
Advantages

Java is a simple language.

Java does not support pointers.

Java is first language in which programs can be executed using web.

Write Once Run Anyehere (WORA).


Disadvantages

• Slow performance.

• No support for low level programming language.

• Poor features in java.

• No control over garbage collection.


API
• Stands for Application Programming interface.
• It is also known as library.
• Contain predefined code that we can use to develop java programs.
JDK
Stands for Java Development Kit.
Set of programs that enable us to develop our programs.
Contains JRE(Java Run time Envirornment) used to run our programs.
JRE & JDK contain JVM.
JVM executes our java programs on different machines.
IDE
• Stands for integrated development environment.
• Write: source code.
• Compile: machine code.
• Debug: tools to find errors.
• Build: files that can be executed using JVM.
• Run: execute our program.
Difference

C++ JAVA
• Platform dependent. • Platform independent.
• Pointers are used. • No pointers.
• Fast compilation. • Slower at compile time.
• Supports only English language. • Supports international languages
• Multiple inheritance. using Unicode.
• No multiple inheritance.
EDITIONS
• JAVA SE: create standalone programs for desktop computers and
services.
• JAVA ME: create programs for smart phones and mobile devices.
• JAVA EE: set of technologies built on sun Java SE. programmer
develop large applications for organizations which is often used in
web for web applications. Its goal is to sharply and reduce time by
program development.

Common questions

Powered by AI

Java is architecturally neutral because it compiles to bytecode which can run on any platform with a Java Virtual Machine (JVM), providing platform independence . In contrast, C++ is platform-dependent, meaning programs must be recompiled for each specific platform. This architectural neutrality is one of Java's strengths as it avoids the need for multiple versions of the same program .

Java addresses the lack of support for multiple inheritance by using interfaces as a workaround, allowing a class to implement multiple interfaces to achieve a form of multiple inheritance without the complications associated with it, such as the diamond problem . In contrast, C++ supports multiple inheritance directly, allowing a class to inherit from multiple classes, which provides more flexibility but also introduces complexity and potential ambiguities .

The absence of pointers in Java improves security and simplifies memory management but can lead to slower performance compared to C++, which uses pointers for efficient memory manipulation . Java's support for Unicode enables internationalization by allowing characters from multiple languages, enhancing usability in global applications, unlike C++, which traditionally supports only English characters .

Java achieves platform independence through the concept of 'Write Once, Run Anywhere' (WORA). This is possible because Java programs are compiled into bytecode that the Java Virtual Machine (JVM) executes, and JVMs are available on many platforms . C++, however, requires recompilation for each hardware platform because it directly compiles to native machine code that is specific to the processor architecture and operating system, making it platform-dependent .

Java APIs facilitate software development by providing a comprehensive set of libraries that include pre-written code for a wide range of tasks, including networking, data structures, and user interface design, significantly reducing development time and ensuring reliability. Compared to other languages, Java's API offers robust cross-platform compatibility and extensive community support, which empowers developers with tools to build complex applications efficiently .

The Java Virtual Machine (JVM) plays a critical role in executing Java programs by translating bytecode into machine language specific to the host CPU. This mechanism is crucial for Java's portability because it allows bytecode to run on any machine with a JVM installed, thus supporting Java's platform-independent nature .

Oracle's acquisition of Java in 2010 has led to increased emphasis on its development and utilization in enterprise-level applications, through enhancements to the Java EE (Enterprise Edition), which provides a robust platform for large-scale, secure, and scalable business applications. It also facilitated integration with Oracle's own database technologies and cloud services, promoting Java's continued prominence in enterprise environments .

The Java Development Kit (JDK) supports the Java program lifecycle by providing tools for writing (code editors), compiling (turning source code to bytecode), debugging (identifying errors), building (preparing libraries and applications), and running (via the Java Runtime Environment, JRE) applications. It includes the JRE and JVM, essential for executing and testing Java programs on different machines, thus facilitating seamless development to execution .

Java offers advantages for embedded systems through its portability, security, and simplicity, enabling the same codebase to run on various hardware platforms with minimal modification. Additionally, its garbage collection aids in memory management. However, drawbacks include potential performance overhead due to its interpreted nature and larger runtime footprint compared to languages like C, which offer more direct system resource control but require more extensive management of memory and processor resources .

Java's multi-threading capabilities significantly enhance modern software development by allowing concurrent execution of multiple sequences of operations, improving the performance of applications, particularly in resource-intensive and real-time computing environments. It provides built-in support for thread management and synchronization, enabling efficient use of processor resources and the development of responsive and scalable applications .

You might also like