How to write java object:for (Object object: list), question?

1. Today, my friend suddenly asked about a way to write for, but Baidu didn"t find the answer for a while, so I posted it for the boss I saw to give me some advice. Thank you!

:
    List<Object> list = new ArrayList<Object>();
    object:for (Object object : list) {
        
    }

:object:forobject

:

clipboard.png

Mar.11,2021

this thing is available in all languages of the label, C system. Just sort out the format a little bit and you'll see:

http://bixuebihui.com

for (Object object : list) {
       
}
Isn't

interesting?

Menu