Answers for "kotlin primary queue"

0

kotlin queue

import java.util.LinkedList


fun main() {

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

    print(queueA.poll())
}
Posted by: Guest on April-19-2020
0

kotlin queue

val studentQueue: Queue<String> = LinkedList<String>(mutableListOf("Agni", "Bob", "Chris", "David", "Emily"))
  println(studentQueue) 
  studentQueue.add("Felix")
  println(studentQueue)
Posted by: Guest on November-10-2021

Browse Popular Code Answers by Language