|
-
February 12th, 1999, 10:21 AM
#1
Runtime decision
hi,
is it possible to decide while runtime wich package to use?
For example, i wrote different socket-classes for OS/2 and NT and
during runtime i have to decide wich classes for the specific
operating system i have to use.
Thanks in advance
werner hutmacher (from germany)
-
February 13th, 1999, 12:01 AM
#2
Re: Runtime decision
Use the complete name for the class you need. E.g.
boolean isNT = myFunctionToDetermineNT();
Socket s;
if( isNT )
{
s = new mypackage.nt.Socket();
}
else
{
s = new mypackage.os2.Socket();
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|