Check out example codes for "kotlin queue". It will help you in understanding the concepts better.

Code Example 1

import java.util.LinkedList


fun main() {

	val queueA = LinkedList<Int>()
    
    queueA.add(1)
    queueA.add(2)

    print(queueA.poll())
}

Learn ReactJs, React Native from akashmittal.com