Java Increment and Decrement Operators i++ and i-- by Example - Java Programming Tutorial

preview_player
Показать описание
Java Increment and Decrement Operators i++ and i--

It is very common to increment and decrement a variable. Java provide the ++ or -- unary operators to do this task.

int i = 0;
i++; //increment
i--; //decremnt

You can place these operators before or after a variable. If an increment or decrement are the only operations in a statement, there is no difference between prefix and postfix notation.

Increment and Decrement Operators

The While Loop

Infinite Loops

Do-While Loop

Do-While Loop Example Where User Prompts to Start Program Over

For Loop

Nested Loop

How to Determine Which Loop to Use?

Sentinal Value

Input Validation using Loops

Break and Continue Statements in a Looping Structure

Enumerations
Рекомендации по теме
Комментарии
Автор

Please SUBSCRIBE! More programming videos coming soon! ✌️

Appficial
Автор

What my teacher explained in 30 minutes is what this guy explained in 3, what a legend.

Ghost_of_Morisset
Автор

Thanks! I've been having trouble with postfix and prefix operators for a while now. Good thing I watched this video before my test!

colinmcneil
Автор

Finally I found non Indian guy with perfect pronunciation. Thanks for the video 🙌

freemoviestream
Автор

I was having problems understanding postfix vs prefix, thanks for this vid. It's short and to the point, explains it perfectly, thank you

JoshuaHall
Автор

It's short and simple to understand, Thank you :)

sushmithams
Автор

thanks for making it short. keep up the good work!

nouraalsaawi
Автор

Really good, bro. Thanks for the video.

AndersonGScarpi
Автор

Perfect! Simple and to the point! THank you! Subscription has been added!

smbunation
Автор

Thank you, tomorrow is my computer exam

godl_ftw
Автор

When I do

int age = 20;
System.out.println(“age”);
Java doesn’t replace age with 20 it just says age when I run the code any help?

mnar