Beruflich Dokumente
Kultur Dokumente
Names like flag and temp are seldom meaningful. Instead of flag, consider naming the Boolean condition
it checks for, such as valueFound.
Consider multi-word identifiers, like nameIndex. Long identifiers (within reason) tend to be very
readable.