Horje
random kotlin cannot create instance of abstract class Code Example
random kotlin cannot create instance of abstract class

Just remove the parentheses: Random.nextInt(7).

Like this it uses the companion object (Default) of 
class Random which implements the abstract class Random with a 
default behaviour.

From the documentation:
The companion object Random.Default is the default instance of Random





Whatever

Related
Abducted Code Example Abducted Code Example
import emoji Code Example import emoji Code Example
(-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow' in pycharm Code Example (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow' in pycharm Code Example
procrasinate Code Example procrasinate Code Example
appbar and bottomnavigationbar flutter Code Example appbar and bottomnavigationbar flutter Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7