Differences between Java and kotlin access modifiers

modifiers

Java

Kotlin

public

all kind of visible

all kind of visible (the default)

private

current class visible

current class visible

prote Cted

the current class, subclass, class is visible under the same package path

the current class, subclass visible

default

class visible (the default) under the same package path

no

internal

no

class is visible in the same module


Read More: