Answers for "using queue in kotlin"

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"))
  val removedElement = studentQueue.remove()
  println(removedElement + " : " + studentQueue)
Posted by: Guest on November-10-2021

Code answers related to "using queue in kotlin"

Browse Popular Code Answers by Language