Click to See Complete Forum and Search --> : Runtime decision


Werner
February 12th, 1999, 09:21 AM
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)

Zafir Anjum
February 12th, 1999, 11:01 PM
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();

}