Creating Named Overlay Classes
Learn the best practice of creating named Overlay classes instead of anonymous inner classes for better code organization.
1 steps
Progress1 / 1 steps
1
Why Named Overlay Classes?
Step 1 of 1
Objective
Understand the benefits of named overlay classes.
Explanation
Named overlay classes are better than anonymous inner classes because: - They're injectable (can use @Inject) - Cleaner code organization - Easier to test - Better IDE support - Can be reused You set layer and position in the constructor.
Your Code
java
AdvertisementSet
slotId on <AdUnit /> to show ads.← Back to Tutorials
🎉 Congratulations! You've completed this tutorial!