Type 1:
class TestExample {
object Bell {
fun add(){
}
}
Class B{
TestExample.Bell.add()
}
Type 2:
class TestExample {
companion object Bell {
fun add(){
}
}
Class B{
TestExample.add()
}
In this type 1 and type 2, which is static example and which is singleton example? Both behaves similar behavior right?