How to define multiple variables in the same line in Kotlin

Viewed 44

I am now switching from C++ to Kotlin, and I need some help. In C++ I could define more than 1 of variables (the same type) in one line, like this:

int r, u, i, p;

How to do the same thing in Kotlin? I've searched a bit, but I didn't find any satisfying answers. Thanks.

0 Answers
Related