Héritage (informatique)En programmation orientée objet, l’héritage est un mécanisme qui permet, lors de la déclaration d’une nouvelle classe, d'y inclure les caractéristiques d’une autre classe. L'héritage établit une relation de généralisation-spécialisation qui permet d'hériter dans la déclaration d’une nouvelle classe (appelée classe dérivée, classe fille, classe enfant ou sous-classe) des caractéristiques (propriétés et méthodes) de la déclaration d'une autre classe (appelée classe de base, classe mère, classe parent ou super-classe).
Méthode (informatique)En programmation orientée objet (POO), une méthode est une routine membre d'une classe. Une méthode peut être: une méthode d'instance, n'agissant que sur un seul objet (instance de la classe) à la fois; une méthode statique ou méthode de classe, indépendante de toute instance de la classe (objet). En programmation orientée objet, on utilise parfois le terme spécifique d'invocation de méthode pour désigner l'appel d'une telle fonction d'une classe.
Programmation orientée objetLa programmation orientée objet (POO), ou programmation par objet, est un paradigme de programmation informatique. Elle consiste en la définition et l'interaction de briques logicielles appelées objets ; un objet représente un concept, une idée ou toute entité du monde physique, comme une voiture, une personne ou encore une page d'un livre. Il possède une structure interne et un comportement, et il sait interagir avec ses pairs.
Object lifetimeIn object-oriented programming (OOP), the object lifetime (or life cycle) of an object is the time between an object's creation and its destruction. Rules for object lifetime vary significantly between languages, in some cases between implementations of a given language, and lifetime of a particular object may vary from one run of the program to another. In some cases, object lifetime coincides with variable lifetime of a variable with that object as value (both for static variables and automatic variables), but in general, object lifetime is not tied to the lifetime of any one variable.
Parametric polymorphismIn programming languages and type theory, parametric polymorphism allows a single piece of code to be given a "generic" type, using variables in place of actual types, and then instantiated with particular types as needed. Parametrically polymorphic functions and data types are sometimes called generic functions and generic datatypes, respectively, and they form the basis of generic programming. Parametric polymorphism may be contrasted with ad hoc polymorphism.
Applet JavaUn applet Java est un applet, fournie aux utilisateurs sous la forme de bytecode Java. Un applet Java peut fonctionner dans un navigateur web, grâce à une machine virtuelle Java (JVM), ou dans l'AppletViewer de Sun, un outil permettant de tester les applets Java. Les applets Java ont été introduits dans la première version du langage, de 1995. Les applets Java sont la plupart du temps écrits en langage Java, mais ils peuvent également être écrits dans n'importe quel langage qui se compile en bytecode, comme Jython, Groovy ou encore Scala.
Polymorphisme (informatique)En informatique et en théorie des types, le polymorphisme, du grec ancien polús (plusieurs) et morphê (forme), est le concept consistant à fournir une interface unique à des entités pouvant avoir différents types. Par exemple, des opérations telles que la multiplication peuvent ainsi être étendues à des scalaires aux vecteurs ou aux matrices, l'addition, des scalaires aux fonctions ou aux chaînes de caractères, etc.
Mutator methodIn computer science, a mutator method is a method used to control changes to a variable. They are also widely known as setter methods. Often a setter is accompanied by a getter, which returns the value of the private member variable. They are also known collectively as accessors. The mutator method is most often used in object-oriented programming, in keeping with the principle of encapsulation.
Ad hoc polymorphismIn programming languages, ad hoc polymorphism is a kind of polymorphism in which polymorphic functions can be applied to arguments of different types, because a polymorphic function can denote a number of distinct and potentially heterogeneous implementations depending on the type of argument(s) to which it is applied. When applied to object-oriented or procedural concepts, it is also known as function overloading or operator overloading.
Java (langage)Java est un langage de programmation de haut niveau orienté objet créé par James Gosling et Patrick Naughton, employés de Sun Microsystems, avec le soutien de Bill Joy (cofondateur de Sun Microsystems en 1982), présenté officiellement le au SunWorld. La société Sun est rachetée en 2009 par la société Oracle qui détient et maintient désormais Java. Un logiciel écrit en language Java a pour particularité d'être compilé vers un code intermédiaire formé de bytecodes qui peut être exécutée dans une machine virtuelle Java (JVM) en faisant abstraction du système d'exploitation.
Java (technique)Java est une technique informatique développée initialement par Sun Microsystems puis acquise par Oracle à la suite du rachat de l'entreprise. Défini à l'origine comme un langage de programmation, Java a évolué pour devenir un ensemble cohérent d'éléments techniques et non techniques.
Virtual method tableIn computer programming, a virtual method table (VMT), virtual function table, virtual call table, dispatch table, vtable, or vftable is a mechanism used in a programming language to support dynamic dispatch (or run-time method binding). Whenever a class defines a virtual function (or method), most compilers add a hidden member variable to the class that points to an array of pointers to (virtual) functions called the virtual method table.
Extension methodIn object-oriented computer programming, an extension method is a method added to an object after the original object was compiled. The modified object is often a class, a prototype or a type. Extension methods are features of some object-oriented programming languages. There is no syntactic difference between calling an extension method and calling a method declared in the type definition. Not all languages implement extension methods in an equally safe manner, however.
Covariance and contravariance (computer science)Many programming language type systems support subtyping. For instance, if the type is a subtype of , then an expression of type should be substitutable wherever an expression of type is used. Variance is how subtyping between more complex types relates to subtyping between their components. For example, how should a list of s relate to a list of s? Or how should a function that returns relate to a function that returns ? Depending on the variance of the type constructor, the subtyping relation of the simple types may be either preserved, reversed, or ignored for the respective complex types.
Héritage multipleEn informatique, l’héritage multiple est un mécanisme de programmation orientée objet dans lequel une classe peut hériter de comportements et de fonctionnalités de plus d'une super-classe. Il s'oppose à l'héritage simple, dans lequel une classe ne peut hériter que d'une seule super-classe. Il est supporté par certains langages de programmation, par exemple C++, Eiffel ou Python. Pouvant poser des problèmes, d’autres langages comme Ada, C#, Fortran, Java, Objective-C, Ruby, Swift ou Visual Basic ont préféré ne pas le proposer directement.
Java version historyThe Java language has undergone several changes since JDK 1.0 as well as numerous additions of classes and packages to the standard library. Since J2SE 1.4, the evolution of the Java language has been governed by the Java Community Process (JCP), which uses Java Specification Requests (JSRs) to propose and specify additions and changes to the Java platform. The language is specified by the Java Language Specification (JLS); changes to the JLS are managed under JSR 901.
Object-oriented designObject-oriented design (OOD) is the process of planning a system of interacting objects for the purpose of solving a software problem. It is one approach to software design. An object contains encapsulated data and procedures grouped together to represent an entity. The 'object interface' defines how the object can be interacted with. An object-oriented program is described by the interaction of these objects. Object-oriented design is the discipline of defining the objects and their interactions to solve a problem that was identified and documented during object-oriented analysis.
Java syntaxThe syntax of Java is the set of rules defining how a Java program is written and interpreted. The syntax is mostly derived from C and C++. Unlike in C++, in Java there are no global functions or variables, but there are data members which are also regarded as global variables. All code belongs to classes and all values are objects. The only exception is the primitive types, which are not represented by a class instance for performance reasons (though can be automatically converted to objects and vice versa via autoboxing).
Bytecode JavaLe bytecode Java est un bytecode destiné à regrouper des instructions exécutables par une machine virtuelle Java. Par extension, il désigne un flux d'octets binaire au format d'une classe Java. Ce flux est habituellement le résultat de la compilation d'un code source, ce code source n'étant pas obligatoirement écrit en langage Java. Ce bytecode peut être exécuté sous de nombreux systèmes d'exploitation par une machine virtuelle Java.
Machine virtuelle Javavignette|Machine virtuelle Java - Spécification Java 7 La machine virtuelle Java (en anglais Java virtual machine, abr. JVM) est un appareil informatique fictif qui exécute des programmes compilés sous forme de bytecode Java. L'appareil est simulé par un logiciel spécifique à chaque plateforme ou couple (machine/système d’exploitation) et permet aux applications Java compilées en bytecode de produire les mêmes résultats quelle que soit la plate-forme, tant que celle-ci est pourvue de la machine virtuelle Java adéquate.