When we create a new java lib module in Android Studio, it's mandatory to provide a name for the java class. I never know what to give, since it's not common to have a central class in a library. What is the purpose of this class?
Asked
Active
Viewed 139 times
1
-
1every java library has at least one class in it, so it is just convenient method to create first one – Iłya Bursov May 11 '17 at 03:08
1 Answers
1
When you are creating a java module, you are basically creating a java file - which will (obviously) contain java code.
The minimal structure of a java code (ClassA.java
file as example) is like this:
// your imports
public class ClassA{
// variables and methods inside ClassA
} // end of ClassA
The code (ClassA.java
file) might contain additional classes - but it must contain at least one public class.
In the dialog box shown in your question, you are asked to provide the name of the public class which will be in the java module.

Muntasir
- 798
- 1
- 14
- 24
-
So when I create my first "real" library class I could delete this default class, isn't it? – alexpfx May 11 '17 at 05:07