IT-SDK-Java-Plus

From wiki.samerhijazi.net
Revision as of 18:25, 30 May 2025 by Samerhijazi (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • How to avoid hardcoding the class name (advanced pattern)
  • Dynamically create a new instance using reflection
  • return getClass().getConstructor(String.class).newInstance(newName);