Java Basics - Varargs

preview_player
Показать описание
Introductino on how to declare and use methods that can accept a variable number of arguments.
This video points out when to use varargs, what restriction applies and it includes a Java method as an example.
Рекомендации по теме
Комментарии
Автор

As always, the video is wonderful -- I had not been making use of this in my Java code -- I am not sure when it was added to the language or if I just was missing out on it all these years.


Next, this smacks of true pedantry, however, as you are a career teacher, I want to correct the English vocabulary used in this video, for use in professional publications, correspondence and interactions with other academics.


There are two different words, one is:
ellipsis
(2nd meaning)
Printing. a mark or marks as ——, …, or * * *, to indicate an omission or suppression of letters or words.
1560–70; < Latin ellīpsis < Greek élleipsis an omission, equivalent to el- (variant of en- en-2) + leip- (stem of leípein to leave) + -sis -sis


The terminal s doesn't necessarily indicate a plural, but comes directly from the Ancient Greek.

ellipse
a plane curve such that the sums of the distances of each point in its periphery from two fixed points, the foci, are equal. It is a conic section formed by the intersection of a right circular cone by a plane that cuts the axis and the surface of the cone.

If you have two of those they are "ellipses" where the s indicates a plural as usual in English, and it is a bit hard to say how many people who write these two words differently actually say them differently in normal English speech. I try to say the first as ending in "sis" like "this" or "hiss" and the latter like "ehz" like in "fez" or "says" (English spelling is horrible).


Apparently the etymologies are related, and go back to the most brilliant mathematician of his day, that master of the conic sections:
1753,  from French ellipse (17c.),  from Latin ellipsis "ellipse, " also,  "a falling short,  deficit, " from Greek elleipsis (seeellipsis). So called because the conic section of the cutting plane makes a smaller angle with the base than does the side of the cone,  hence,  a "falling short." First applied by Apollonius of Perga (3c. B.C.E.).

jvsnyc
Автор

where are you Margret ??? we need you in our world, please comeback with more video

proud
Автор

One thing I have a big question about: how do you initialize a varargs constructor? I have been looking all over the internet to find out, and it is really stumping me.

HadenAndShit