Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Assign 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Advanced java programming

Dr. Yazeed almoayad

Assignment 1

Khaled Mahmoud
Ci893
What are the characteristics of JAVA programming
language? Discuss in detail.

simple

If you are familiar with C or C++ programming, Java will come naturally to you
because it borrows many of its syntaxes from those two languages. Numerous
complex and rarely used features, including pointers, operator overloading, etc., have
been eliminated from Java. Additionally, an automatic garbage collector eliminates
memory-hungry and inactive object instances without the need for manual
intervention.

Object-Oriented

A language for object-oriented programming is Java. A programming paradigm


known as object-oriented programming (OOP) centers software design around data
rather than functions and logic. A data field having unique features and behavior is
called an object. The variables Name, Class, Roll Number, Father's Name, and Marks,
for instance, can be found in a student class, along with methods for storing and
retrieving these values.

Instead than concentrating on the logic needed to control the objects, object-
oriented programming (OOP) concentrates on the objects that developers want to
handle. Big, complex, and regularly updated or maintained projects are best suited for
this type of programming. This includes mobile applications as well as design and
manufacturing software; for instance, OOP can be used to model manufacturing
systems.

Platform Independent

On a variety of operating systems, including Windows, Linux, macOS, and others,


Java code can be executed. Java code is compiled by the compiler and transformed
into byte code. This byte code, also known as Write Once, Run Anywhere (WORA),
is platform-independent since it can run on various operating systems.
Secure

In a networked and distributed environment, Java is employed. Java is a secure


language thanks to the following characteristics:

 No explicit pointers are used


 The Java Virtual Machine, often known as JVM, houses the Java program
while it is running.
 Classloader: To dynamically load Java classes into the Java Virtual Machine,
utilize the classloader included in the Java Runtime Environment (JRE). By
separating the package for local file system classes from those imported from
network sources, it enhances security.
 Verifier for byte codes
 Security Director: It decides what resources, such reading and writing to the
local disc, are available to a class.

Robust

The word "robust" denotes "powerful." However, in a programmer's dictionary, it


means dependable. No programming language can guarantee complete dependability.
Because Java compilers can detect many flaws that would appear during execution in
other languages, the language places a high value on early error checking. In Java,
certain types of error-prone programming constructs that are common in other
languages have been removed. It, for example, does not support pointers, which
reduces the risk of overwriting memory and causing data damage. Java offers a
runtime exception-handling technique to help with programming resilience. Java
requires programmers to write exception-handling code. Java can identify and
respond to uncommon circumstances, allowing the application to execute normally
while gracefully ending when a runtime error occurs.

Architectural Neutral

Java is architecture-neutral because it has no implementation-dependent


characteristics, such as the size of primitive types. The int data type in C
programming takes up two bytes in 32-bit architecture and four bytes in 64-bit design.
However, in Java, it takes up 4 bytes of memory on both 32-bit and 64-bit
architectures, giving the developer the option of byte overflow or slicing.

Portable

Because Java programs are architecture-independent, they are portable. They do not
require recompilation to run on any platform. Java programs can be translated into
byte code, which is portable.

Performance

Because byte codes are so close to machine code, Java's performance and
efficiency are exceptional. However, it is still slower than compiled languages such as
C++. The primary issue is that, unlike C and C++ programs, Java applications execute
on a Java virtual machine (JVM) after compilation rather than directly on the
computer's CPU as native code.
The performance of a Java bytecode compiled Java program is governed by how
well the host Java virtual machine (JVM) manages its assigned duties and how well
the JVM makes use of the computer hardware and operating system (OS). Its
performance is sufficient for most interactive applications where the CPU is
frequently idle waiting for input or data from other sources.

Distributed

The collaboration of several computers over a network is what distributed


computing is all about. The purpose of Java was to make distributed computing
simple. Because networking is built into Java, creating network programs is as easy as
sending and receiving data to and from a file. Java also provides powerful tools for
creating microservices (an architectural approach in which an application is organized
as a collection of tiny services) in networked systems.

Multithreaded
Multi-threading is a Java feature that allows two or more portions of a program to
run at the same time to maximize CPU performance. A thread is one of the program's
components. Threads are thus lightweight processes contained within processes. A
user, for example, can listen to an audio recording while perusing the web. In network
programming, a server can serve multiple clients at the same time. Similarly, there are
several things happening on at the same time in GUI programming. These concurrent
processes can be implemented in Java using multi-threading.

dynamic

Java is considered dynamic due to bytecode. Source code written on one platform
can be executed on any other platform. The class file is only loaded at runtime. As a
result, everything that happens during the runtime is dynamic. Java also supports
dynamic compilation as well as memory management (garbage collection).

You might also like