I have a situation where I have to do some thing like this
for (int i = 0; i < list.size; i++) //Master for loop
{
//I need a control statement here to control list1 i.e. only if statement
if (time == list1.get(someInteger))
{
//do something
}
else
{
//do something else
}
}
But every "if" should be followed by an "else", and I don't seem to understand how to go about it. Ive tried do and while but to no avail. For me it is important to execute both if and else, yet have a control statement for only "if".
Is that possible?