CSD201_-_FA_2024_-_FE_-_C1_2980.webp
T

CSD201_-_FA_2024_-_FE_-_C1_2980.webp

  • Media owner Thu Hà1
  • Ngày thêm
(Choose 1 answer)
Specify the correct implementation of pop() method of a stack of Integers. This stack uses
java.util.LinkedList for storing data and the end of the list is treated as the top of the stack. (Choose the most suitable one)
A. void pop(Integer x)
{ if (isEmpty()) return(null);pool.remove(pool.size()-1);}
B. Integer pop()
{ if (isEmpty()) return(null);return((Integer) pool.removeLast());}
C. Integer pop()
{if (isEmpty()) return;return((Integer) pool.remove(pool.size()-1));}
D. Integer pop()
{ if (isEmpty()) return(null);return((Integer) pool.remove(pool.size()));}

12

Thông tin

Category
CSD201
Thêm bởi
Thu Hà1
Ngày thêm
Lượt xem
9,762
Lượt bình luận
31
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
CSD201_-_FA_2024_-_FE_-_C1_2980.webp
File size
235 KB
Dimensions
1920px x 1012px

Share this media

Back
Bên trên Bottom