question: public static void deleteTabs ( User user , DashBoard dash , int lastTabIndex ) { List < Widget > zeroTabWidgets = new ArrayList < > ( ) ; int removedWidgetPrice = 0 ; for ( Widget widget : dash . widgets ) { if ( widget . tabId > lastTabIndex ) { removedWidgetPrice += widget . getPrice ( ) ; } else { zeroTabWidgets . add ( widget ) ; } } user . recycleEnergy ( removedWidgetPrice ) ; dash . widgets = zeroTabWidgets . toArray ( new Widget [ zeroTabWidgets . size ( ) ] ) ; dash . updatedAt = System . currentTimeMillis ( ) ; }
target:  Removes all widgets with tabId greater than lastTabIndex