Learn Ruby

What is the class of String and Integer

Just for fun let’s ask what is the class of “Hello CodeNewton”.

The output is String. And that is correct. hello is an instance of String class.

Now let’s try the same thing on an integer.

The output is Number. It means all the integers are instances of class Number.