KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When is it necessary to use the new keyword in Java. I know you are supposed to use it when you create an instance of an object like this: TextView textView = new TextView(this); Sometimes in code I notice that new isn't used and I get confused.. In this line of code: AssetManager assetManager = getAssets(); Why isn't an instance of the AssetManager created like this: AssetManager assetManager = new AssetManager(); then it is set equal to getAssests()? When should new be used?
Tags (comma-separated)
Save Edits
Cancel