Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Class.forName().newInstance() vs new
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Ian Shef, post: 4220042"] Maybe yes, maybe no. If you don't have a benchmark that shows it to be an issue, don't worry about it. Initializing the databas manager is probably going to be a lot more preformance-consuming than anything else that you are doing here. Well, actually you _do_ know the type for db, you just didn't show us directly; apparently it is DB. What you don't know at compile time is the implementation. I prefer to use java.util.ServiceLoader myself. It means that you have to have "a provider-configuration file in the resource directory META- INF/services" instead of a property or a value in a separate configuration file. This could be a good thing or a bad thing, depending upon your application. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Class.forName().newInstance() vs new
Top