Find the object count

Report a typo

How many objects do we allocate in the heap memory when running this application?

Java
    public static void main(String[] args) {
        Object obj_1 = new Object();
        Object obj_2 = obj_1;
    }
Kotlin
    fun main() {
        val obj1 = Any()
        val obj2 = obj1
    }
Enter a number
___

Create a free account to access the full topic