CSD201_-_SP_2024_-_Block_5_-_RE_1957.webp
thanhvan86

CSD201_-_SP_2024_-_Block_5_-_RE_1957.webp

(Choose 1 answer)
Specify the correct implementation of dequeue() method of a queue. This queue uses java.util.ArrayList for storing data and the head of the list is treated as the head of the queue. (Choose the most suitable one)
A. Object dequeue(){ if (isEmpty()) return(null);return(pool.remove(pool.size()));}
B. void dequeue(Object x){ if (isEmpty()) return(null);pool.remove(pool.size()-1);}
C. Object dequeue(){if (isEmpty()) return;return(pool.remove(pool.size()-1));}
D. Object dequeue(){ if (isEmpty()) return(null);return(pool.remove(0));}
FUO
50

Thông tin

Category
CSD201
Thêm bởi
thanhvan86
Ngày thêm
Lượt xem
2,105
Lượt bình luận
14
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
CSD201_-_SP_2024_-_Block_5_-_RE_1957.webp
File size
235.5 KB
Dimensions
1920px x 892px

Share this media

Back
Bên trên Bottom