Why getText() method returns Object instead of String in Protractor?

When using Java, getText() method returns the corresponding text from the element. However in Protractor, getText() method returns Object something like [objectObject].

In Protractor, the getText() method returns a Promise. We need to resolve this in order to get the text.

Syntax:

element.getText().then(function (text)
{ 
    console.log(text); 
});