I’m kind of a noob at Android, and I downloaded some source code to try to help me learn a bit. When I opened the code, I noticed that many of the .Java files included in the Src folder of the source code had no onCreate() methods. I always assumed that to make a .Java class run, it had to have an onCreate() method.
So… Do all of the .Java files compile and run at once?!
The .java files need not to be always have onCreate() method. Only the Android Components like Activity, Service, BroadcastReceiver containts this onCreate() method as part of their life cycle.
A normal library like .java can have only public class with useful method declaration, so these .java files need not declare onCreate() method or main().
the .java files you are seeing in the project is normal .java file that may contain only constant codes or library class/methods.