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

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -