Java Interview Guide: How to Build Confidence With a Solid Understanding of Core Java Principles pdfdrive com



Yüklə 0,53 Mb.
Pdf görüntüsü
səhifə2/47
tarix06.05.2023
ölçüsü0,53 Mb.
#108601
1   2   3   4   5   6   7   8   9   ...   47
Java Interview Guide

The Java Programming Language
The History of Java
Java is an object-oriented programming language that was released by Sun
Microsystems in 1995. Unlike C++, it allowed developers to write code that
could run on multiple platforms. This principle, called Write Once,
Run Anywhere (WORA), prevented the need for developers to write different
applications for different operating systems. Java borrowed much of its syntax
from C++, but it streamlined development by providing features such
as automatic memory management and by eliminating pitfalls such as multiple
inheritance.


The Java Virtual Machine
The WORA principle is possible because of the Java Virtual Machine (JVM).
A virtual machine is software that emulates a physical machine. In traditional
programming languages, code is compiled into machine language for a specific
platform. In Java, code is compiled into a virtual machine language called
bytecode. The JVM acts as an intermediary between bytecode and the
underlying physical machine.
Every platform that supports Java has its own implementation of the JVM.
Java applications are portable because every JVM adheres to a standard
interface. The distribution package of the JVM and standard libraries is called
the Java Runtime Environment (JRE). The distribution package of the JRE and
development tools, such as the compiler and debugger, is called the Java
Development Kit (JDK).


Procedural Programming vs Object-Oriented Programming
Procedural programming is a style of writing code that executes a series of linear
procedures to produce a result. Object-oriented programming is a style of writing
code that uses objects to encapsulate state and behavior. Procedural code
is easier to use in small projects or in multithreaded environments due to its
stateless nature, but object-oriented code is far more flexible and easier
to maintain.


Questions
What is the WORA principle? Why is it beneficial?
How can Java applications run on multiple platforms?
What is the difference between the JRE and the JDK?
What is the difference between procedural programming and object-oriented
programming?



Yüklə 0,53 Mb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9   ...   47




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin