How to understand flag variable in java programming and how to use flag variable ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to understand flag variable in java programming and how to use flag variable ?

for example set variable boolean flag = false ;

3rd Feb 2020, 3:55 AM
Vikram Singh
Vikram Singh - avatar
2 Answers
0
Can you show an example of a flag variable? not sure what you meant here ...
3rd Feb 2020, 3:57 AM
Ipang
0
flag = true indicates that something has happened or should happen. The variable name does not specify what, but another part of the code knows the meaning and what it has to do
3rd Feb 2020, 6:48 AM
zemiak