Search This Blog

Sunday, December 15, 2024

Cosmology

From Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Cosmology
The Hubble eXtreme Deep Field (XDF) was completed in September 2012 and shows the farthest galaxies ever photographed at that time. Except for the few stars in the foreground (which are bright and easily recognizable because only they have diffraction spikes), every speck of light in the photo is an individual galaxy, some of them as old as 13.2 billion years; the observable universe is estimated to contain more than 2 trillion galaxies.

Cosmology (from Ancient Greek κόσμος (cosmos) 'the universe, the world' and λογία (logia) 'study of') is a branch of physics and metaphysics dealing with the nature of the universe, the cosmos. The term cosmology was first used in English in 1656 in Thomas Blount's Glossographia, and in 1731 taken up in Latin by German philosopher Christian Wolff in Cosmologia Generalis. Religious or mythological cosmology is a body of beliefs based on mythological, religious, and esoteric literature and traditions of creation myths and eschatology. In the science of astronomy, cosmology is concerned with the study of the chronology of the universe.

Physical cosmology is the study of the observable universe's origin, its large-scale structures and dynamics, and the ultimate fate of the universe, including the laws of science that govern these areas. It is investigated by scientists, including astronomers and physicists, as well as philosophers, such as metaphysicians, philosophers of physics, and philosophers of space and time. Because of this shared scope with philosophy, theories in physical cosmology may include both scientific and non-scientific propositions and may depend upon assumptions that cannot be tested. Physical cosmology is a sub-branch of astronomy that is concerned with the universe as a whole. Modern physical cosmology is dominated by the Big Bang Theory which attempts to bring together observational astronomy and particle physics; more specifically, a standard parameterization of the Big Bang with dark matter and dark energy, known as the Lambda-CDM model.

Theoretical astrophysicist David N. Spergel has described cosmology as a "historical science" because "when we look out in space, we look back in time" due to the finite nature of the speed of light.

Disciplines

Physics and astrophysics have played central roles in shaping our understanding of the universe through scientific observation and experiment. Physical cosmology was shaped through both mathematics and observation in an analysis of the whole universe. The universe is generally understood to have begun with the Big Bang, followed almost instantaneously by cosmic inflation, an expansion of space from which the universe is thought to have emerged 13.799 ± 0.021 billion years ago. Cosmogony studies the origin of the universe, and cosmography maps the features of the universe.

In Diderot's Encyclopédie, cosmology is broken down into uranology (the science of the heavens), aerology (the science of the air), geology (the science of the continents), and hydrology (the science of waters).

Metaphysical cosmology has also been described as the placing of humans in the universe in relationship to all other entities. This is exemplified by Marcus Aurelius's observation that a man's place in that relationship: "He who does not know what the world is does not know where he is, and he who does not know for what purpose the world exists, does not know who he is, nor what the world is."

Discoveries

Physical cosmology

Physical cosmology is the branch of physics and astrophysics that deals with the study of the physical origins and evolution of the universe. It also includes the study of the nature of the universe on a large scale. In its earliest form, it was what is now known as "celestial mechanics," the study of the heavens. Greek philosophers Aristarchus of Samos, Aristotle, and Ptolemy proposed different cosmological theories. The geocentric Ptolemaic system was the prevailing theory until the 16th century when Nicolaus Copernicus, and subsequently Johannes Kepler and Galileo Galilei, proposed a heliocentric system. This is one of the most famous examples of epistemological rupture in physical cosmology.

Isaac Newton's Principia Mathematica, published in 1687, was the first description of the law of universal gravitation. It provided a physical mechanism for Kepler's laws and also allowed the anomalies in previous systems, caused by gravitational interaction between the planets, to be resolved. A fundamental difference between Newton's cosmology and those preceding it was the Copernican principle—that the bodies on Earth obey the same physical laws as all celestial bodies. This was a crucial philosophical advance in physical cosmology.

Modern scientific cosmology is widely considered to have begun in 1917 with Albert Einstein's publication of his final modification of general relativity in the paper "Cosmological Considerations of the General Theory of Relativity" (although this paper was not widely available outside of Germany until the end of World War I). General relativity prompted cosmogonists such as Willem de Sitter, Karl Schwarzschild, and Arthur Eddington to explore its astronomical ramifications, which enhanced the ability of astronomers to study very distant objects. Physicists began changing the assumption that the universe was static and unchanging. In 1922, Alexander Friedmann introduced the idea of an expanding universe that contained moving matter.

In parallel to this dynamic approach to cosmology, one long-standing debate about the structure of the cosmos was coming to a climax – the Great Debate (1917 to 1922) – with early cosmologists such as Heber Curtis and Ernst Öpik determining that some nebulae seen in telescopes were separate galaxies far distant from our own. While Heber Curtis argued for the idea that spiral nebulae were star systems in their own right as island universes, Mount Wilson astronomer Harlow Shapley championed the model of a cosmos made up of the Milky Way star system only. This difference of ideas came to a climax with the organization of the Great Debate on 26 April 1920 at the meeting of the U.S. National Academy of Sciences in Washington, D.C. The debate was resolved when Edwin Hubble detected Cepheid Variables in the Andromeda Galaxy in 1923 and 1924. Their distance established spiral nebulae well beyond the edge of the Milky Way.

Subsequent modelling of the universe explored the possibility that the cosmological constant, introduced by Einstein in his 1917 paper, may result in an expanding universe, depending on its value. Thus the Big Bang model was proposed by the Belgian priest Georges Lemaître in 1927 which was subsequently corroborated by Edwin Hubble's discovery of the redshift in 1929 and later by the discovery of the cosmic microwave background radiation by Arno Penzias and Robert Woodrow Wilson in 1964. These findings were a first step to rule out some of many alternative cosmologies.

Since around 1990, several dramatic advances in observational cosmology have transformed cosmology from a largely speculative science into a predictive science with precise agreement between theory and observation. These advances include observations of the microwave background from the COBE, WMAP and Planck satellites, large new galaxy redshift surveys including 2dfGRS and SDSS, and observations of distant supernovae and gravitational lensing. These observations matched the predictions of the cosmic inflation theory, a modified Big Bang theory, and the specific version known as the Lambda-CDM model. This has led many to refer to modern times as the "golden age of cosmology".

In 2014, the BICEP2 collaboration claimed that they had detected the imprint of gravitational waves in the cosmic microwave background. However, this result was later found to be spurious: the supposed evidence of gravitational waves was in fact due to interstellar dust.

On 1 December 2014, at the Planck 2014 meeting in Ferrara, Italy, astronomers reported that the universe is 13.8 billion years old and composed of 4.9% atomic matter, 26.6% dark matter and 68.5% dark energy.

Religious or mythological cosmology

Religious or mythological cosmology is a body of beliefs based on mythological, religious, and esoteric literature and traditions of creation and eschatology. Creation myths are found in most religions, and are typically split into five different classifications, based on a system created by Mircea Eliade and his colleague Charles Long.

  • Types of Creation Myths based on similar motifs:
    • Creation ex nihilo in which the creation is through the thought, word, dream or bodily secretions of a divine being.
    • Earth diver creation in which a diver, usually a bird or amphibian sent by a creator, plunges to the seabed through a primordial ocean to bring up sand or mud which develops into a terrestrial world.
    • Emergence myths in which progenitors pass through a series of worlds and metamorphoses until reaching the present world.
    • Creation by the dismemberment of a primordial being.
    • Creation by the splitting or ordering of a primordial unity such as the cracking of a cosmic egg or a bringing order from chaos.

Philosophy

Representation of the observable universe on a logarithmic scale. Distance from the Sun increases from center to edge. Planets and other celestial bodies were enlarged to appreciate their shapes.

Cosmology deals with the world as the totality of space, time and all phenomena. Historically, it has had quite a broad scope, and in many cases was found in religion. Some questions about the Universe are beyond the scope of scientific inquiry but may still be interrogated through appeals to other philosophical approaches like dialectics. Some questions that are included in extra-scientific endeavors may include: Charles Kahn, an important historian of philosophy, attributed the origins of ancient Greek cosmology to Anaximander.

  • What is the origin of the universe? What is its first cause (if any)? Is its existence necessary? (see monism, pantheism, emanationism and creationism)
  • What are the ultimate material components of the universe? (see mechanism, dynamism, hylomorphism, atomism)
  • What is the ultimate reason (if any) for the existence of the universe? Does the cosmos have a purpose? (see teleology)
  • Does the existence of consciousness have a role in the existence of reality? How do we know what we know about the totality of the cosmos? Does cosmological reasoning reveal metaphysical truths? (see epistemology)

Historical cosmologies

Name Author and date Classification Remarks
Hindu cosmology Rigveda (c. 1700–1100 BCE) Cyclical or oscillating, Infinite in time Primal matter remains manifest for 311.04 trillion years and unmanifest for an equal length of time. The universe remains manifest for 4.32 billion years and unmanifest for an equal length of time. Innumerable universes exist simultaneously. These cycles have and will last forever, driven by desires.
Zoroastrian Cosmology Avesta (c. 1500–600 BCE) Dualistic Cosmology According to Zoroastrian Cosmology, the universe is the manifestation of perpetual conflict between Existence and non-existence, Good and evil and light and darkness. the universe will remain in this state for 12000 years; at the time of resurrection, the two elements will be separated again.
Jain cosmology Jain Agamas (written around 500 CE as per the teachings of Mahavira 599–527 BCE) Cyclical or oscillating, eternal and finite Jain cosmology considers the loka, or universe, as an uncreated entity, existing since infinity, the shape of the universe as similar to a man standing with legs apart and arm resting on his waist. This Universe, according to Jainism, is broad at the top, narrow at the middle and once again becomes broad at the bottom.
Babylonian cosmology Babylonian literature (c. 2300–500 BCE) Flat Earth floating in infinite "waters of chaos" The Earth and the Heavens form a unit within infinite "waters of chaos"; the Earth is flat and circular, and a solid dome (the "firmament") keeps out the outer "chaos"-ocean.
Eleatic cosmology Parmenides (c. 515 BCE) Finite and spherical in extent The Universe is unchanging, uniform, perfect, necessary, timeless, and neither generated nor perishable. Void is impossible. Plurality and change are products of epistemic ignorance derived from sense experience. Temporal and spatial limits are arbitrary and relative to the Parmenidean whole.
Samkhya Cosmic Evolution Kapila (6th century BCE), pupil Asuri Prakriti (Matter) and Purusha (Consiouness) Relation Prakriti (Matter) is the source of the world of becoming. It is pure potentiality that evolves itself successively into twenty four tattvas or principles. The evolution itself is possible because Prakriti is always in a state of tension among its constituent strands known as gunas (Sattva (lightness or purity), Rajas (passion or activity), and Tamas (inertia or heaviness)). The cause and effect theory of Sankhya is called Satkaarya-vaada (theory of existent causes), and holds that nothing can really be created from or destroyed into nothingness—all evolution is simply the transformation of primal Nature from one form to another.
Biblical cosmology Genesis creation narrative Earth floating in infinite "waters of chaos" The Earth and the Heavens form a unit within infinite "waters of chaos"; the "firmament" keeps out the outer "chaos"-ocean.
Anaximander's model Anaximander (c. 560 BCE) Geocentric, cylindrical Earth, infinite in extent, finite time; first purely mechanical model The Earth floats very still in the centre of the infinite, not supported by anything. At the origin, after the separation of hot and cold, a ball of flame appeared that surrounded Earth like bark on a tree. This ball broke apart to form the rest of the Universe. It resembled a system of hollow concentric wheels, filled with fire, with the rims pierced by holes like those of a flute; no heavenly bodies as such, only light through the holes. Three wheels, in order outwards from Earth: stars (including planets), Moon and a large Sun.
Atomist universe Anaxagoras (500–428 BCE) and later Epicurus Infinite in extent The universe contains only two things: an infinite number of tiny seeds (atoms) and the void of infinite extent. All atoms are made of the same substance, but differ in size and shape. Objects are formed from atom aggregations and decay back into atoms. Incorporates Leucippus' principle of causality: "nothing happens at random; everything happens out of reason and necessity". The universe was not ruled by gods.
Pythagorean universe Philolaus (d. 390 BCE) Existence of a "Central Fire" at the center of the Universe. At the center of the Universe is a central fire, around which the Earth, Sun, Moon and planets revolve uniformly. The Sun revolves around the central fire once a year, the stars are immobile. The Earth in its motion maintains the same hidden face towards the central fire, hence it is never seen. First known non-geocentric model of the Universe.
De Mundo Pseudo-Aristotle (d. 250 BCE or between 350 and 200 BCE) The Universe is a system made up of heaven and Earth and the elements which are contained in them. There are "five elements, situated in spheres in five regions, the less being in each case surrounded by the greater – namely, earth surrounded by water, water by air, air by fire, and fire by ether – make up the whole Universe."
Stoic universe Stoics (300 BCE – 200 CE) Island universe The cosmos is finite and surrounded by an infinite void. It is in a state of flux, and pulsates in size and undergoes periodic upheavals and conflagrations.
Platonic universe Plato (c. 360 BCE) Geocentric, complex cosmogony, finite extent, implied finite time, cyclical Static Earth at center, surrounded by heavenly bodies which move in perfect circles, arranged by the will of the Demiurge in order: Moon, Sun, planets and fixed stars. Complex motions repeat every 'perfect' year.
Eudoxus' model Eudoxus of Cnidus (c. 340 BCE) and later Callippus Geocentric, first geometric-mathematical model The heavenly bodies move as if attached to a number of Earth-centered concentrical, invisible spheres, each of them rotating around its own and different axis and at different paces. There are twenty-seven homocentric spheres with each sphere explaining a type of observable motion for each celestial object. Eudoxus emphasised that this is a purely mathematical construct of the model in the sense that the spheres of each celestial body do not exist, it just shows the possible positions of the bodies.
Aristotelian universe Aristotle (384–322 BCE) Geocentric (based on Eudoxus' model), static, steady state, finite extent, infinite time Static and spherical Earth is surrounded by 43 to 55 concentric celestial spheres, which are material and crystalline. Universe exists unchanged throughout eternity. Contains a fifth element, called aether, that was added to the four classical elements.
Aristarchean universe Aristarchus (c. 280 BCE) Heliocentric Earth rotates daily on its axis and revolves annually about the Sun in a circular orbit. Sphere of fixed stars is centered about the Sun.
Ptolemaic model Ptolemy (2nd century CE) Geocentric (based on Aristotelian universe) Universe orbits around a stationary Earth. Planets move in circular epicycles, each having a center that moved in a larger circular orbit (called an eccentric or a deferent) around a center-point near Earth. The use of equants added another level of complexity and allowed astronomers to predict the positions of the planets. The most successful universe model of all time, using the criterion of longevity. The Almagest (the Great System).
Capella's model Martianus Capella (c. 420) Geocentric and Heliocentric The Earth is at rest in the center of the universe and circled by the Moon, the Sun, three planets and the stars, while Mercury and Venus circle the Sun.
Aryabhatan model Aryabhata (499) Geocentric or Heliocentric The Earth rotates and the planets move in elliptical orbits around either the Earth or Sun; uncertain whether the model is geocentric or heliocentric due to planetary orbits given with respect to both the Earth and Sun.
Quranic cosmology Quran (610–632 CE) Flat-earth The universe consists of stacked flat layers, including seven levels of heaven and in some interpretations seven levels of earth (including hell)
Medieval universe Medieval philosophers (500–1200) Finite in time A universe that is finite in time and has a beginning is proposed by the Christian philosopher John Philoponus, who argues against the ancient Greek notion of an infinite past. Logical arguments supporting a finite universe are developed by the early Muslim philosopher Al-Kindi, the Jewish philosopher Saadia Gaon, and the Muslim theologian Al-Ghazali.
Non-Parallel Multiverse Bhagvata Puran (800–1000) Multiverse, Non Parallel Innumerable universes is comparable to the multiverse theory, except nonparallel where each universe is different and individual jiva-atmas (embodied souls) exist in exactly one universe at a time. All universes manifest from the same matter, and so they all follow parallel time cycles, manifesting and unmanifesting at the same time.
Multiversal cosmology Fakhr al-Din al-Razi (1149–1209) Multiverse, multiple worlds and universes There exists an infinite outer space beyond the known world, and God has the power to fill the vacuum with an infinite number of universes.
Maragha models Maragha school (1259–1528) Geocentric Various modifications to Ptolemaic model and Aristotelian universe, including rejection of equant and eccentrics at Maragheh observatory, and introduction of Tusi-couple by Al-Tusi. Alternative models later proposed, including the first accurate lunar model by Ibn al-Shatir, a model rejecting stationary Earth in favour of Earth's rotation by Ali Kuşçu, and planetary model incorporating "circular inertia" by Al-Birjandi.
Nilakanthan model Nilakantha Somayaji (1444–1544) Geocentric and heliocentric A universe in which the planets orbit the Sun, which orbits the Earth; similar to the later Tychonic system.
Copernican universe Nicolaus Copernicus (1473–1543) Heliocentric with circular planetary orbits, finite extent First described in De revolutionibus orbium coelestium. The Sun is in the center of the universe, planets including Earth orbit the Sun, but the Moon orbits the Earth. The universe is limited by the sphere of the fixed stars.
Tychonic system Tycho Brahe (1546–1601) Geocentric and Heliocentric A universe in which the planets orbit the Sun and the Sun orbits the Earth, similar to the earlier Nilakanthan model.
Bruno's cosmology Giordano Bruno (1548–1600) Infinite extent, infinite time, homogeneous, isotropic, non-hierarchical Rejects the idea of a hierarchical universe. Earth and Sun have no special properties in comparison with the other heavenly bodies. The void between the stars is filled with aether, and matter is composed of the same four elements (water, earth, fire, and air), and is atomistic, animistic and intelligent.
De Magnete William Gilbert (1544–1603) Heliocentric, indefinitely extended Copernican heliocentrism, but he rejects the idea of a limiting sphere of the fixed stars for which no proof has been offered.
Keplerian Johannes Kepler (1571–1630) Heliocentric with elliptical planetary orbits Kepler's discoveries, marrying mathematics and physics, provided the foundation for the present conception of the Solar System, but distant stars were still seen as objects in a thin, fixed celestial sphere.
Static Newtonian Isaac Newton (1642–1727) Static (evolving), steady state, infinite Every particle in the universe attracts every other particle. Matter on the large scale is uniformly distributed. Gravitationally balanced but unstable.
Cartesian Vortex universe René Descartes 17th century Static (evolving), steady state, infinite System of huge swirling whirlpools of aethereal or fine matter produces gravitational effects. But his vacuum was not empty; all space was filled with matter.
Hierarchical universe Immanuel Kant, Johann Lambert 18th century Static (evolving), steady state, infinite Matter is clustered on ever larger scales of hierarchy. Matter is endlessly recycled.
Einstein Universe with a cosmological constant Albert Einstein 1917 Static (nominally). Bounded (finite) "Matter without motion". Contains uniformly distributed matter. Uniformly curved spherical space; based on Riemann's hypersphere. Curvature is set equal to Λ. In effect Λ is equivalent to a repulsive force which counteracts gravity. Unstable.
De Sitter universe Willem de Sitter 1917 Expanding flat space.

Steady state. Λ > 0

"Motion without matter." Only apparently static. Based on Einstein's general relativity. Space expands with constant acceleration. Scale factor increases exponentially (constant inflation).
MacMillan universe William Duncan MacMillan 1920s Static and steady state New matter is created from radiation; starlight perpetually recycled into new matter particles.
Friedmann universe, spherical space Alexander Friedmann 1922 Spherical expanding space. k = +1 ; no Λ Positive curvature. Curvature constant k = +1

Expands then recollapses. Spatially closed (finite).

Friedmann universe, hyperbolic space Alexander Friedmann 1924 Hyperbolic expanding space. k = −1 ; no Λ Negative curvature. Said to be infinite (but ambiguous). Unbounded. Expands forever.
Dirac large numbers hypothesis Paul Dirac 1930s Expanding Demands a large variation in G, which decreases with time. Gravity weakens as universe evolves.
Friedmann zero-curvature Einstein and De Sitter 1932 Expanding flat space

k = 0 ; Λ = 0 Critical density

Curvature constant k = 0. Said to be infinite (but ambiguous). "Unbounded cosmos of limited extent". Expands forever. "Simplest" of all known universes. Named after but not considered by Friedmann. Has a deceleration term q = 1/2, which means that its expansion rate slows down.
The original Big Bang (Friedmann-Lemaître) Georges Lemaître 1927–1929 Expansion

Λ > 0 ; Λ > |Gravity|

Λ is positive and has a magnitude greater than gravity. Universe has initial high-density state ("primeval atom"). Followed by a two-stage expansion. Λ is used to destabilize the universe. (Lemaître is considered the father of the Big Bang model.)
Oscillating universe (Friedmann-Einstein) Favored by Friedmann 1920s Expanding and contracting in cycles Time is endless and beginningless; thus avoids the beginning-of-time paradox. Perpetual cycles of Big Bang followed by Big Crunch. (Einstein's first choice after he rejected his 1917 model.)
Eddington universe Arthur Eddington 1930 First static then expands Static Einstein 1917 universe with its instability disturbed into expansion mode; with relentless matter dilution becomes a De Sitter universe. Λ dominates gravity.
Milne universe of kinematic relativity Edward Milne 1933, 1935;

William H. McCrea 1930s

Kinematic expansion without space expansion Rejects general relativity and the expanding space paradigm. Gravity not included as initial assumption. Obeys cosmological principle and special relativity; consists of a finite spherical cloud of particles (or galaxies) that expands within an infinite and otherwise empty flat space. It has a center and a cosmic edge (surface of the particle cloud) that expands at light speed. Explanation of gravity was elaborate and unconvincing.
Friedmann–Lemaître–Robertson–Walker class of models Howard Robertson, Arthur Walker 1935 Uniformly expanding Class of universes that are homogeneous and isotropic. Spacetime separates into uniformly curved space and cosmic time common to all co-moving observers. The formulation system is now known as the FLRW or Robertson–Walker metrics of cosmic time and curved space.
Steady-state Hermann Bondi, Thomas Gold 1948 Expanding, steady state, infinite Matter creation rate maintains constant density. Continuous creation out of nothing from nowhere. Exponential expansion. Deceleration term q = −1.
Steady-state Fred Hoyle 1948 Expanding, steady state; but unstable Matter creation rate maintains constant density. But since matter creation rate must be exactly balanced with the space expansion rate the system is unstable.
Ambiplasma Hannes Alfvén 1965 Oskar Klein Cellular universe, expanding by means of matter–antimatter annihilation Based on the concept of plasma cosmology. The universe is viewed as "meta-galaxies" divided by double layers and thus a bubble-like nature. Other universes are formed from other bubbles. Ongoing cosmic matter-antimatter annihilations keep the bubbles separated and moving apart preventing them from interacting.
Brans–Dicke theory Carl H. Brans, Robert H. Dicke Expanding Based on Mach's principle. G varies with time as universe expands. "But nobody is quite sure what Mach's principle actually means."
Cosmic inflation Alan Guth 1980 Big Bang modified to solve horizon and flatness problems Based on the concept of hot inflation. The universe is viewed as a multiple quantum flux – hence its bubble-like nature. Other universes are formed from other bubbles. Ongoing cosmic expansion kept the bubbles separated and moving apart.
Eternal inflation (a multiple universe model) Andreï Linde 1983 Big Bang with cosmic inflation Multiverse based on the concept of cold inflation, in which inflationary events occur at random each with independent initial conditions; some expand into bubble universes supposedly like the entire cosmos. Bubbles nucleate in a spacetime foam.
Cyclic model Paul Steinhardt; Neil Turok 2002 Expanding and contracting in cycles; M-theory Two parallel orbifold planes or M-branes collide periodically in a higher-dimensional space. With quintessence or dark energy.
Cyclic model Lauris Baum; Paul Frampton 2007 Solution of Tolman's entropy problem Phantom dark energy fragments universe into large number of disconnected patches. The observable patch contracts containing only dark energy with zero entropy.

Table notes: the term "static" simply means not expanding and not contracting. Symbol G represents Newton's gravitational constant; Λ (Lambda) is the cosmological constant.

Java (programming language)

From Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Java_(programming_language)

ParadigmMulti-paradigm: generic, object-oriented (class-based), functional, imperative, reflective, concurrent
Designed byJames Gosling
DeveloperOracle Corporation
First appearedMay 23, 1995; 29 years ago
Typing disciplineStatic, strong, safe, nominative, manifest
Memory managementAutomatic garbage collection
Filename extensions.java, .class, .jar, .jmod, .war

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need to recompile. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but has fewer low-level facilities than either of them. The Java runtime provides dynamic capabilities (such as reflection and runtime code modification) that are typically not available in traditional compiled languages.

Java gained popularity shortly after its release, and has been a very popular programming language since then. Java was the third most popular programming language in 2022 according to GitHub. Although still widely popular, there has been a gradual decline in use of Java in recent years with other languages using JVM gaining popularity.

Java was originally developed by James Gosling at Sun Microsystems. It was released in May 1995 as a core component of Sun's Java platform. The original and reference implementation Java compilers, virtual machines, and class libraries were originally released by Sun under proprietary licenses. As of May 2007, in compliance with the specifications of the Java Community Process, Sun had relicensed most of its Java technologies under the GPL-2.0-only license. Oracle offers its own HotSpot Java Virtual Machine, however the official reference implementation is the OpenJDK JVM which is free open-source software and used by most developers and is the default JVM for almost all Linux distributions.

As of September 2024, Java 23 is the latest version (Java 22, and 20 are no longer maintained). Java 8, 11, 17, and 21 are previous LTS versions still officially supported.

History

Duke, the Java mascot
James Gosling, the creator of Java, in 2008

James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. Java was originally designed for interactive television, but it was too advanced for the digital cable television industry at the time. The language was initially called Oak after an oak tree that stood outside Gosling's office. Later the project went by the name Green and was finally renamed Java, from Java coffee, a type of coffee from Indonesia. Gosling designed Java with a C/C++-style syntax that system and application programmers would find familiar.

Sun Microsystems released the first public implementation as Java 1.0 in 1996. It promised write once, run anywhere (WORA) functionality, providing no-cost run-times on popular platforms. Fairly secure and featuring configurable security, it allowed network- and file-access restrictions. Major web browsers soon incorporated the ability to run Java applets within web pages, and Java quickly became popular. The Java 1.0 compiler was re-written in Java by Arthur van Hoff to comply strictly with the Java 1.0 language specification. With the advent of Java 2 (released initially as J2SE 1.2 in December 1998 – 1999), new versions had multiple configurations built for different types of platforms. J2EE included technologies and APIs for enterprise applications typically run in server environments, while J2ME featured APIs optimized for mobile applications. The desktop version was renamed J2SE. In 2006, for marketing purposes, Sun renamed new J2 versions as Java EE, Java ME, and Java SE, respectively.

In 1997, Sun Microsystems approached the ISO/IEC JTC 1 standards body and later the Ecma International to formalize Java, but it soon withdrew from the process. Java remains a de facto standard, controlled through the Java Community Process. At one time, Sun made most of its Java implementations available without charge, despite their proprietary software status. Sun generated revenue from Java through the selling of licenses for specialized products such as the Java Enterprise System.

On November 13, 2006, Sun released much of its Java virtual machine (JVM) as free and open-source software (FOSS), under the terms of the GPL-2.0-only license. On May 8, 2007, Sun finished the process, making all of its JVM's core code available under free software/open-source distribution terms, aside from a small portion of code to which Sun did not hold the copyright.

Sun's vice-president Rich Green said that Sun's ideal role with regard to Java was as an evangelist.[32] Following Oracle Corporation's acquisition of Sun Microsystems in 2009–10, Oracle has described itself as the steward of Java technology with a relentless commitment to fostering a community of participation and transparency. This did not prevent Oracle from filing a lawsuit against Google shortly after that for using Java inside the Android SDK (see the Android section).

On April 2, 2010, James Gosling resigned from Oracle.

In January 2016, Oracle announced that Java run-time environments based on JDK 9 will discontinue the browser plugin.

Java software runs on everything from laptops to data centers, game consoles to scientific supercomputers.

Oracle (and others) highly recommend uninstalling outdated and unsupported versions of Java, due to unresolved security issues in older versions.

Principles

There were five primary goals in creating the Java language:

  1. It must be simple, object-oriented, and familiar.
  2. It must be robust and secure.
  3. It must be architecture-neutral and portable.
  4. It must execute with high performance.
  5. It must be interpreted, threaded, and dynamic.

Versions

As of November 2024, Java 8, 11, 17, and 21 are supported as long-term support (LTS) versions, with Java 25, releasing in September 2025, as the next scheduled LTS version.

Oracle released the last zero-cost public update for the legacy version Java 8 LTS in January 2019 for commercial use, although it will otherwise still support Java 8 with public updates for personal use indefinitely. Other vendors such as Adoptium continue to offer free builds of OpenJDK's long-term support (LTS) versions. These builds may include additional security patches and bug fixes.

Major release versions of Java, along with their release dates:

Version Date
JDK Beta 1995
JDK 1.0 January 23, 1996
JDK 1.1 February 19, 1997
J2SE 1.2 December 8, 1998
J2SE 1.3 May 8, 2000
J2SE 1.4 February 6, 2002
J2SE 5.0 September 30, 2004
Java SE 6 December 11, 2006
Java SE 7 July 28, 2011
Java SE 8 (LTS) March 18, 2014
Java SE 9 September 21, 2017
Java SE 10 March 20, 2018
Java SE 11 (LTS) September 25, 2018
Java SE 12 March 19, 2019
Java SE 13 September 17, 2019
Java SE 14 March 17, 2020
Java SE 15 September 15, 2020
Java SE 16 March 16, 2021
Java SE 17 (LTS) September 14, 2021
Java SE 18 March 22, 2022
Java SE 19 September 20, 2022
Java SE 20 March 21, 2023
Java SE 21 (LTS) September 19, 2023
Java SE 22 March 19, 2024
Java SE 23 September 17, 2024

Editions

Sun has defined and supports four editions of Java targeting different application environments and segmented many of its APIs so that they belong to one of the platforms. The platforms are:

The classes in the Java APIs are organized into separate groups called packages. Each package contains a set of related interfaces, classes, subpackages and exceptions.

Sun also provided an edition called Personal Java that has been superseded by later, standards-based Java ME configuration-profile pairings.

Execution system

Java JVM and bytecode

One design goal of Java is portability, which means that programs written for the Java platform must run similarly on any combination of hardware and operating system with adequate run time support. This is achieved by compiling the Java language code to an intermediate representation called Java bytecode, instead of directly to architecture-specific machine code. Java bytecode instructions are analogous to machine code, but they are intended to be executed by a virtual machine (VM) written specifically for the host hardware. End-users commonly use a Java Runtime Environment (JRE) installed on their device for standalone Java applications or a web browser for Java applets.

Standard libraries provide a generic way to access host-specific features such as graphics, threading, and networking.

The use of universal bytecode makes porting simple. However, the overhead of interpreting bytecode into machine instructions made interpreted programs almost always run more slowly than native executables. Just-in-time (JIT) compilers that compile byte-codes to machine code during runtime were introduced from an early stage. Java's Hotspot compiler is actually two compilers in one; and with GraalVM (included in e.g. Java 11, but removed as of Java 16) allowing tiered compilation. Java itself is platform-independent and is adapted to the particular platform it is to run on by a Java virtual machine (JVM), which translates the Java bytecode into the platform's machine language.

Performance

Programs written in Java have a reputation for being slower and requiring more memory than those written in C++. However, Java programs' execution speed improved significantly with the introduction of just-in-time compilation in 1997/1998 for Java 1.1, the addition of language features supporting better code analysis (such as inner classes, the StringBuilder class, optional assertions, etc.), and optimizations in the Java virtual machine, such as HotSpot becoming Sun's default JVM in 2000. With Java 1.5, the performance was improved with the addition of the java.util.concurrent package, including lock-free implementations of the ConcurrentMaps and other multi-core collections, and it was improved further with Java 1.6.

Non-JVM

Some platforms offer direct hardware support for Java; there are micro controllers that can run Java bytecode in hardware instead of a software Java virtual machine, and some ARM-based processors could have hardware support for executing Java bytecode through their Jazelle option, though support has mostly been dropped in current implementations of ARM.

Automatic memory management

Java uses an automatic garbage collector to manage memory in the object lifecycle. The programmer determines when objects are created, and the Java runtime is responsible for recovering the memory once objects are no longer in use. Once no references to an object remain, the unreachable memory becomes eligible to be freed automatically by the garbage collector. Something similar to a memory leak may still occur if a programmer's code holds a reference to an object that is no longer needed, typically when objects that are no longer needed are stored in containers that are still in use. If methods for a non-existent object are called, a null pointer exception is thrown.

One of the ideas behind Java's automatic memory management model is that programmers can be spared the burden of having to perform manual memory management. In some languages, memory for the creation of objects is implicitly allocated on the stack or explicitly allocated and deallocated from the heap. In the latter case, the responsibility of managing memory resides with the programmer. If the program does not deallocate an object, a memory leak occurs. If the program attempts to access or deallocate memory that has already been deallocated, the result is undefined and difficult to predict, and the program is likely to become unstable or crash. This can be partially remedied by the use of smart pointers, but these add overhead and complexity. Garbage collection does not prevent logical memory leaks, i.e. those where the memory is still referenced but never used.

Garbage collection may happen at any time. Ideally, it will occur when a program is idle. It is guaranteed to be triggered if there is insufficient free memory on the heap to allocate a new object; this can cause a program to stall momentarily. Explicit memory management is not possible in Java.

Java does not support C/C++ style pointer arithmetic, where object addresses can be arithmetically manipulated (e.g. by adding or subtracting an offset). This allows the garbage collector to relocate referenced objects and ensures type safety and security.

As in C++ and some other object-oriented languages, variables of Java's primitive data types are either stored directly in fields (for objects) or on the stack (for methods) rather than on the heap, as is commonly true for non-primitive data types (but see escape analysis). This was a conscious decision by Java's designers for performance reasons.

Java contains multiple types of garbage collectors. Since Java 9, HotSpot uses the Garbage First Garbage Collector (G1GC) as the default. However, there are also several other garbage collectors that can be used to manage the heap, such as the Z Garbage Collector (ZGC) introduced in Java 11, and Shenandoah GC, introduced in Java 12 but unavailable in Oracle-produced OpenJDK builds. Shenandoah is instead available in third-party builds of OpenJDK, such as Eclipse Temurin. For most applications in Java, G1GC is sufficient. In prior versions of Java, such as Java 8, the Parallel Garbage Collector was used as the default garbage collector.

Having solved the memory management problem does not relieve the programmer of the burden of handling properly other kinds of resources, like network or database connections, file handles, etc., especially in the presence of exceptions.

Syntax

This dependency graph of the Java Core classes was created with jdeps and Gephi.

The syntax of Java is largely influenced by C++ and C. Unlike C++, which combines the syntax for structured, generic, and object-oriented programming, Java was built almost exclusively as an object-oriented language. All code is written inside classes, and every data item is an object, with the exception of the primitive data types, (i.e. integers, floating-point numbers, boolean values, and characters), which are not objects for performance reasons. Java reuses some popular aspects of C++ (such as the printf method).

Unlike C++, Java does not support operator overloading or multiple inheritance for classes, though multiple inheritance is supported for interfaces.

Java uses comments similar to those of C++. There are three different styles of comments: a single line style marked with two slashes (//), a multiple line style opened with /* and closed with */, and the Javadoc commenting style opened with /** and closed with */. The Javadoc style of commenting allows the user to run the Javadoc executable to create documentation for the program and can be read by some integrated development environments (IDEs) such as Eclipse to allow developers to access documentation within the IDE.

Hello world

The following is a simple example of a "Hello, World!" program that writes a message to the standard output:

public class Example {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

Special classes

Applet

Java applets are programs embedded in other applications, mainly in web pages displayed in web browsers. The Java applet API was deprecated with the release of Java 9 in 2017.

Servlet

Java servlet technology provides Web developers with a simple, consistent mechanism for extending the functionality of a Web server and for accessing existing business systems. Servlets are server-side Java EE components that generate responses to requests from clients. Most of the time, this means generating HTML pages in response to HTTP requests, although there are a number of other standard servlet classes available, for example for WebSocket communication.

The Java servlet API has to some extent been superseded (but still used under the hood) by two standard Java technologies for web services:

Typical implementations of these APIs on Application Servers or Servlet Containers use a standard servlet for handling all interactions with the HTTP requests and responses that delegate to the web service methods for the actual business logic.

JavaServer Pages

JavaServer Pages (JSP) are server-side Java EE components that generate responses, typically HTML pages, to HTTP requests from clients. JSPs embed Java code in an HTML page by using the special delimiters <% and %>. A JSP is compiled to a Java servlet, a Java application in its own right, the first time it is accessed. After that, the generated servlet creates the response.

Swing application

Swing is a graphical user interface library for the Java SE platform. It is possible to specify a different look and feel through the pluggable look and feel system of Swing. Clones of Windows, GTK+, and Motif are supplied by Sun. Apple also provides an Aqua look and feel for macOS. Where prior implementations of these looks and feels may have been considered lacking, Swing in Java SE 6 addresses this problem by using more native GUI widget drawing routines of the underlying platforms.

JavaFX application

JavaFX is a software platform for creating and delivering desktop applications, as well as rich web applications that can run across a wide variety of devices. JavaFX is intended to replace Swing as the standard graphical user interface (GUI) library for Java SE, but since JDK 11 JavaFX has not been in the core JDK and instead in a separate module. JavaFX has support for desktop computers and web browsers on Microsoft Windows, Linux, and macOS. JavaFX does not have support for native OS look and feels.

Generics

In 2004, generics were added to the Java language, as part of J2SE 5.0. Prior to the introduction of generics, each variable declaration had to be of a specific type. For container classes, for example, this is a problem because there is no easy way to create a container that accepts only specific types of objects. Either the container operates on all subtypes of a class or interface, usually Object, or a different container class has to be created for each contained class. Generics allow compile-time type checking without having to create many container classes, each containing almost identical code. In addition to enabling more efficient code, certain runtime exceptions are prevented from occurring, by issuing compile-time errors. If Java prevented all runtime type errors (ClassCastExceptions) from occurring, it would be type safe.

In 2016, the type system of Java was proven unsound in that it is possible to use generics to construct classes and methods that allow assignment of an instance one class to a variable of another unrelated class. Such code is accepted by the compiler, but fails at run time with a class cast exception.

Criticism

Criticisms directed at Java include the implementation of generics, speed, the handling of unsigned numbers, the implementation of floating-point arithmetic, and a history of security vulnerabilities in the primary Java VM implementation HotSpot. Developers have criticized the complexity and verbosity of the Java Persistence API (JPA), a standard part of Java EE. This has led to increased adoption of higher-level abstractions like Spring Data JPA, which aims to simplify database operations and reduce boilerplate code. The growing popularity of such frameworks suggests limitations in the standard JPA implementation's ease-of-use for modern Java development.

Class libraries

The Java Class Library is the standard library, developed to support application development in Java. It is controlled by Oracle in cooperation with others through the Java Community Process program. Companies or individuals participating in this process can influence the design and development of the APIs. This process has been a subject of controversy during the 2010s. The class library contains features such as:

Documentation

Javadoc is a comprehensive documentation system, created by Sun Microsystems. It provides developers with an organized system for documenting their code. Javadoc comments have an extra asterisk at the beginning, i.e. the delimiters are /** and */, whereas the normal multi-line comments in Java are delimited by /* and */, and single-line comments start with //.

Implementations

Oracle Corporation owns the official implementation of the Java SE platform, due to its acquisition of Sun Microsystems on January 27, 2010. This implementation is based on the original implementation of Java by Sun. The Oracle implementation is available for Windows, macOS, Linux, and Solaris. Because Java lacks any formal standardization recognized by Ecma International, ISO/IEC, ANSI, or other third-party standards organizations, the Oracle implementation is the de facto standard.

The Oracle implementation is packaged into two different distributions: The Java Runtime Environment (JRE) which contains the parts of the Java SE platform required to run Java programs and is intended for end users, and the Java Development Kit (JDK), which is intended for software developers and includes development tools such as the Java compiler, Javadoc, Jar, and a debugger. Oracle has also released GraalVM, a high performance Java dynamic compiler and interpreter.

OpenJDK is another Java SE implementation that is licensed under the GNU GPL. The implementation started when Sun began releasing the Java source code under the GPL. As of Java SE 7, OpenJDK is the official Java reference implementation.

The goal of Java is to make all implementations of Java compatible. Historically, Sun's trademark license for usage of the Java brand insists that all implementations be compatible. This resulted in a legal dispute with Microsoft after Sun claimed that the Microsoft implementation did not support Java remote method invocation (RMI) or Java Native Interface (JNI) and had added platform-specific features of their own. Sun sued in 1997, and, in 2001, won a settlement of US$20 million, as well as a court order enforcing the terms of the license from Sun. As a result, Microsoft no longer ships Java with Windows.

Platform-independent Java is essential to Java EE, and an even more rigorous validation is required to certify an implementation. This environment enables portable server-side applications.

Use outside the Java platform

The Java programming language requires the presence of a software platform in order for compiled programs to be executed.

Oracle supplies the Java platform for use with Java. The Android SDK is an alternative software platform, used primarily for developing Android applications with its own GUI system.

Android

The Java language is a key pillar in Android, an open source mobile operating system. Although Android, built on the Linux kernel, is written largely in C, the Android SDK uses the Java language as the basis for Android applications but does not use any of its standard GUI, SE, ME or other established Java standards. The bytecode language supported by the Android SDK is incompatible with Java bytecode and runs on its own virtual machine, optimized for low-memory devices such as smartphones and tablet computers. Depending on the Android version, the bytecode is either interpreted by the Dalvik virtual machine or compiled into native code by the Android Runtime.

Android does not provide the full Java SE standard library, although the Android SDK does include an independent implementation of a large subset of it. It supports Java 6 and some Java 7 features, offering an implementation compatible with the standard library (Apache Harmony).

Controversy

The use of Java-related technology in Android led to a legal dispute between Oracle and Google. On May 7, 2012, a San Francisco jury found that if APIs could be copyrighted, then Google had infringed Oracle's copyrights by the use of Java in Android devices. District Judge William Alsup ruled on May 31, 2012, that APIs cannot be copyrighted, but this was reversed by the United States Court of Appeals for the Federal Circuit in May 2014. On May 26, 2016, the district court decided in favor of Google, ruling the copyright infringement of the Java API in Android constitutes fair use. In March 2018, this ruling was overturned by the Appeals Court, which sent down the case of determining the damages to federal court in San Francisco. Google filed a petition for writ of certiorari with the Supreme Court of the United States in January 2019 to challenge the two rulings that were made by the Appeals Court in Oracle's favor. On April 5, 2021, the Court ruled 6–2 in Google's favor, that its use of Java APIs should be considered fair use. However, the court refused to rule on the copyrightability of APIs, choosing instead to determine their ruling by considering Java's API copyrightable "purely for argument's sake."

Luminiferous aether

From Wikipedia, the free encyclopedia https://en.wikipedia.org/wiki/Luminiferous_aether ...