반응형
public class ConnectionPropertyTest {
	public static void main(String[] args) {
	    Properties properties = new Properties();
	    try {
	        properties.loadFromXML(new FileInputStream("connection_properties.xml"));
	        
	        String root = (String)properties.get("root");
	        System.out.println(root);
	        
	        String max = (String)properties.get("max");
	        System.out.println(max);
	    } catch (FileNotFoundException e) {
	        e.printStackTrace();
	    } catch (IOException e) {
	        e.printStackTrace();
	    }
	}
}




    root
    100

반응형

WRITTEN BY
데르벨준

,