This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

new operator

 
aijazali chhachhar
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why we donot use new operator for laoding drivers?why class.forname
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class.forName() doesn't return an instance, it initializes a class and returns a Class object.
Class Class (It is not a typo).

So why forName()?
Because it allows you to instantiate a class that you don't know until runtime, so your code is more dynamic.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47253
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch aijazali chhachhar
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic