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

Browse Popular Code Answers by Language