dkim18
asked on
Class.forName(visitNoteClass).newInstance();
hi!
I need to know what this line does in detail?
Class.forName(visitNoteCla ss).newIns tance();
++++++++++++++++++++++
private String visitNoteClass = null;
private HttpServletRequest request = null;
private ActionMapping mapping = null;
...
...
}
public ActionForward execute() {
VisitNoteType v = null;
Connection conn = null;
OraConnDispenser ocd = null;
try {
v = (VisitNoteType) Class.forName(visitNoteCla ss).newIns tance();
v.init(request);
ocd = new OraConnDispenser(null);
conn = ocd.getConnection();
...
...
++++++++
thanks,
I need to know what this line does in detail?
Class.forName(visitNoteCla
++++++++++++++++++++++
private String visitNoteClass = null;
private HttpServletRequest request = null;
private ActionMapping mapping = null;
...
...
}
public ActionForward execute() {
VisitNoteType v = null;
Connection conn = null;
OraConnDispenser ocd = null;
try {
v = (VisitNoteType) Class.forName(visitNoteCla
v.init(request);
ocd = new OraConnDispenser(null);
conn = ocd.getConnection();
...
...
++++++++
thanks,
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:-)
Not strictly true, as different subclasses of Excepetion are thrown, although it does make the code more readable/maintainable