Week2 objects and parameters

 0    12 informačný list    up804653
stiahnuť mp3 vytlačiť hrať Skontrolujte sa
 
otázka English Odpoveď English
What is the class name
začať sa učiť
the name of a class
give an example of the class name
začať sa učiť
ClassName objectName; or public class Main {...
what is declaration?
začať sa učiť
a declaration is a language construct that specifies properties of an identifier:
give an example of class and variable declararions
začať sa učiť
ClassName objectName; or String foo;
what is initialisation?
začať sa učiť
the assignment of an initial value for a data object or variable.
give an example of initialisation
začať sa učiť
objectName = new ClassName(param); or foo = bar;
what are parameters?
začať sa učiť
a special kind of variable, used in a subroutine to refer to one of the pieces of data provided as input to the subroutine. These pieces of data are also called arguments
what is polymorphism?
začať sa učiť
It is the practice of designing objects to share behaviors and to be able to override shared behaviours with specific one. seehttps://stackoverflow.com/questions/27642239/what-is-polymorphism-in-javascript
what is method overwriting?
začať sa učiť
allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes
what is overloading?
začať sa učiť
to define two or more functions with the same name and in the same scope. Each function has a unique signature (or header), which is derived from: function/procedure name. number of arguments. arguments' type.
what is a constructor?
začať sa učiť
constructor is a special type of subroutine called to create an object. It prepares the new object for use, often accepting arguments that the constructor uses to set required member variables
what does the key word new do?
začať sa učiť
, it creates a brand new object, irrespective of whether one already exists. It creates a new object and stuffs the reference to that object inside the variable it has been given, overwriting any previous value (object) the variable held.

Ak chcete pridať komentár, musíte byť prihlásený.