- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
99℅ of Beginners Fail this Simple Java Math..Can you guess the output? #devjava #facts #coding
Most people see x = x++ and instantly think 6. But the answer is actually 5! Here is exactly why:
When you use the post-increment operator (x++) combined with an assignment (=):
1️⃣ Java remembers the original value of x (which is 5) and holds it temporarily.
2️⃣ It increments the actual x variable to 6 in the background.
3️⃣ The assignment = operator kicks in and overwrites x with that original, temporarily saved value (5)!
To actually make it 6, you just need to write x++; by itself, or use pre-increment: x = ++x;
Did you guess 5 or 6 at first glance? Be honest in the comments!
Follow @DevDotJava to build your logic and master Java & DSA from scratch!
#JavaProgramming #CodingLife #LearnToCode #Developer #TechTips #CodingBootcamp #DevJava #SoftwareEngineer #BTech #CodingInterview #JavaDeveloper
Видео 99℅ of Beginners Fail this Simple Java Math..Can you guess the output? #devjava #facts #coding канала DevDotJava
When you use the post-increment operator (x++) combined with an assignment (=):
1️⃣ Java remembers the original value of x (which is 5) and holds it temporarily.
2️⃣ It increments the actual x variable to 6 in the background.
3️⃣ The assignment = operator kicks in and overwrites x with that original, temporarily saved value (5)!
To actually make it 6, you just need to write x++; by itself, or use pre-increment: x = ++x;
Did you guess 5 or 6 at first glance? Be honest in the comments!
Follow @DevDotJava to build your logic and master Java & DSA from scratch!
#JavaProgramming #CodingLife #LearnToCode #Developer #TechTips #CodingBootcamp #DevJava #SoftwareEngineer #BTech #CodingInterview #JavaDeveloper
Видео 99℅ of Beginners Fail this Simple Java Math..Can you guess the output? #devjava #facts #coding канала DevDotJava
Комментарии отсутствуют
Информация о видео
17 февраля 2026 г. 23:22:38
00:00:06
Другие видео канала




















