Ruby - Basics and Runtime
What will be the output of this Ruby code?
str = "hello" puts str.object_id.class
str = "hello" puts str.object_id.class
object_id on a string, which returns an integer representing the object's unique ID. Then it calls class on that integer.object_id returns an integer, calling class on it returns Integer.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions