RUVIDEO
Поделитесь видео 🙏

Java Crash Course: Assignment Operators

📁 Обучение 👁️ 16 📅 05.12.2023

Assignment operators

Follow along with the instructions at: http://fullstackclouddeveloper.com/course/java-for-beginners/index.html#assignment_operators

=

The assignment operator = assigns the value on the right to the variable on the left.

int thing = 2; // = 2

+=

The addition assignment operator assigns the sum of the variable value on the left and the addend value on the right.

int thing = 2;
thing += 3; // = 5

-=

The subtraction assignment operator assigns the difference of the minuend variable value on the left and the subtrahend value on the right.

int thing = 5;
thing -= 2; // = 3

*=

The multiplication assignment operator assigns the product of the multiplicand variable value on the left by the multiplier value on the right.

int thing = 5;
thing *= 3; // = 15

/=

The division assignment operator assigns the quotient of the dividend variable value on the left by the divisor value on the right.

int thing = 15;
thing /= 3; // = 5

%=

The modulo assignment operator assigns the remainder of the dividend variable value on the left by the division value on the right.

int thing = 15;
thing %= 6; // = 3

++

post-incrementer

A post-incrementer will increment the value by 1 and if you access the return of this operation the variable with return not incremented yet.

int counter = 1;

int i = counter++; // i = 1, counter = 2
int j = counter; // j = 2

pre-incrementer

A pre-incrementer will increment the value by 1 and if you access the return of this operation the variable will return incremented.

int counter = 1;

int i = ++counter; // i = 2, counter = 2
int j = counter; // j = 2

---

post-decrementer

A post-decrementer will decrement the value by 1 and if you access the return of this operation the variable with return not decremented yet.

int counter = 3;

int i = counter--; // i = 3, counter = 2
int j = counter; // j = 2

pre-decrementer

A pre-decrementer will decrement the value by 1 and if you access the return of this operation the variable will return decremented.

int counter = 3;

int i = --counter; // i = 2, counter = 2
int j = counter; // j = 2

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Java Crash Course: Assignment Operators», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.