我使用以下代码创建了属性对象 -
import java.util.*;
public class setPropertyTest {
public static void main(String[] args) {
Map<String, String> mp1 = new HashMap<>();
mp1.put("from", "somethingfrom");
mp1.put("to", "somethingTO");
Map<String, Map<String,String>> mp2 = new HashMap<>();
mp2.put("testing", mp1);
Properties properties = new Properties();
properties.putAll(mp2);
}
}
当我打印属性时,它会打印到如下所示的内容 -
{testing={from=somethingfrom, to=somethingTO}}
如何from
从属性对象中检索键值?