How to convert an int to a binary string in Kotlin

1 Answer

0 votes
fun main() {
    var num = 698

    println(Integer.toBinaryString(num))
}



/*
run:
  
1010111010
  
*/

 



answered Oct 25, 2024 by avibootz

Related questions

1 answer 119 views
3 answers 130 views
1 answer 88 views
1 answer 99 views
...