Q:

When to use the 'new' keyword to instantiate objects

Im learning how to program android apps at the moment. Im currently messing around with it. 
Right now I'm creating a custom Toast where I create a layout in XML and convert that XML into java (using the LayoutInflater class) so that the layout appears in the Toast and then disappears after 2-3 seconds (using Toast.LENGTH_LONG).
I was watching a youtube video about that and I noticed something. The person said he instantiated an object when he wrote this:
LayoutInflater inflater= getLayoutInflator();
but i thought you need to use the new keyword to instantiate/create objects so why didn't he use it. I then tried writing
LayoutInflater inflater = new LayoutInflater(); 
and got the following error:
Cannot instantiate the type LayoutInflater.

I know that you get this error when trying to create an object from an interface but I don't think the layoutinflater is an interface but a class.

A:

LayoutInflater is an abstract class. Therefore, it cannot be instantiated.

