The Baeldung logo
  • The Baeldung LogoKotlin SublogoKotlin Sublogo
  • Start Here
  • Guides ▼▲
    • Kotlin Tutorial

      Learn about the core concepts and basic building blocks of Kotlin.

    • Kotlin Collections

      Learn how to use collections in Kotlin.

    • Kotlin Basics

      Introductory examples for Kotlin.

    • Kotlin Classes and Objects

      Classes and Objects provide the foundation for all Kotlin development.

    • Kotlin with Spring

      Learn how to use the Spring framework with Kotlin.

  • Pricing
  • About ▼▲
    • Full Archive

      The high level overview of all the articles on the site.

    • About Baeldung

      About Baeldung.

Category upKotlin

Kotlin Numbers

Working with numbers and manipulating numerical data using math is a common job in Kotlin like the other programming languages. Learn the basics of working with numbers in Kotlin like conversion between different data types, formatting, searching, random number generation, and more.

  • Math (12)
  • Float (2)
  • Regex (2)
  • String Conversions (2)
  • List (2)
  • Kotlin Operator (2)

>> Convert Between Int and Char in Kotlin

>> Kotlin Bit Operations

>> Convert Long to Int

>> Check if a Number Is Odd or Even in Kotlin

>> Convert Boolean to Int in Kotlin

>> Pad a Number in Kotlin

>> Count Number of Digits With Kotlin

>> Number Formatting in Kotlin

>> Rounding Numbers in Kotlin

>> Get a Random Number in Kotlin

  • «
  • ← Previous
  • 1
  • 2
  • 3
  • 4
  • Next →
The Baeldung logo

Categories

  • Kotlin Basics
  • Kotlin Classes and Objects
  • Spring with Kotlin

Series

  • Kotlin Collections
  • Kotlin Strings
  • Kotlin Tutorial
  • Kotlin Spring
  • Kotlin Coroutines Tutorial

About

  • About Baeldung
  • Baeldung All Access
  • The Full Archive
  • Editors
  • Our Partners
  • Partner with Baeldung
  • eBooks
  • FAQ
  • Baeldung Pro
  • Terms Of Service
  • Privacy Policy
  • Company Info
  • Contact
The Baeldung Logo