Is Public Charging Station Safe?

It is obvious that When your Phone is running out of Battery , you'll look for a Public Charging Station to charge your Phone.

Now a Days,you can easily find one in Airports ,Shopping Malls or Restaurant, but the Question arises ,Is it safe to use One?

Experts has reported that , it's easy as ABC for anonymous to install Malware, Hack your Phone or Steal your Personal Information and Data, while Charging your Phone...,How?

While discussing this with my friend, He explained that there are two types of Chargers ,we can see in public kiosk ,

First, that Directly charge phone using an Adapter or from Power Socket, that types of charger are 99% Harmless,

Second, That Charges your Phone via USB Port and attached with Computer, in this case ,you can compromise with your phone,

He also said that there is no doubt on the security of a Public Charging Kiosk in Airport, but in case of Shopping Malls, Restaurants, we don't know who's behind the Wall and operating that station,

What can be done ,in case you urgently need to charge your Phone?
It's Simple , about 95% of the Phones available in the Market provide the facillity to charge the phone ,when it's completely Switched off.

When your Phone is completely turned off, you'll be able to charge the phone, but nobody is able to install malware, hack your phone or Steal Data from your Phone