Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why is some code in italics in Android studio

Tags:

android

For example:

File myFile = Environment.getExternalStorageDirectory();

What is the significance of the function name in italic?

Thanks.

like image 223
Vishal Sinha Avatar asked Feb 09 '23 13:02

Vishal Sinha


1 Answers

It is italic because the method is static. You don't need to create a new Instance of Environment to call the getExternalStorageDirectory() function.

like image 59
Jörn Buitink Avatar answered Mar 07 '23 11:03

Jörn Buitink