sdf

abcd·2024년 11월 19일

test22

목록 보기
6/6

public class NestedListHandler {
// 재귀 함수 정의
public static void printNestedList(List nestedList) {
for (Object item : nestedList) {
if (item instanceof List) {
// item이 리스트인 경우 재귀 호출
printNestedList((List)item);
} else {
// item이 리스트가 아닌 경우 출력
System.debug(item);
}
}
}

0개의 댓글