CSD201_-_1_-_FA_2023_-_FE_1030.webp
H

CSD201_-_1_-_FA_2023_-_FE_1030.webp

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


Exit 29

Thông tin

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

Image metadata

Filename
CSD201_-_1_-_FA_2023_-_FE_1030.webp
File size
57.7 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom