Java conditional imports -


how have conditional imports in java have ifdefs in c intend achieve

ifdef test import com.google.mystubs.swing; elif import javax.swing.*; endif 

you don't have conditional import java

but conditionally use different classes same name using qualified name

for example:

if(usesql){   java.sql.date date = new java.sql.date() }else{   java.util.date date = new java.util.date() } 

Comments

Popular posts from this blog

Glib GIOChannel -

jsp - java.sql.SQLException: [Microsoft][ODBC Microsoft Access > Driver] Too few parameters. Expected 1 -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -