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

Browse Popular Code Answers by Language