一个困惑已久的问题,我不知道该如何阐述,请看我的事例.
<xml>
<class name>myclass</class name>
<atrribute index="1" type = "String"> myvalue1</atrribute>
<atrribute index="2" type = "String"> myvalue2</atrribute>
<atrribute index="3" type = "String"> myvalue3</atrribute>
<atrribute index="4" type = "String"> myvalue4</atrribute>
</xml>
有些java对象可以通过这个xml文件生成.对象的名字叫myclass.而且里面的属性就是上面的四个atrribute
不知道这样的类如何创建,这个属于那部分的知识?
困惑点:因为我们一般生成一个对象都要 new objecname();来创建,而这个objecname又不可能通过一个String的串来替代,所以非常困惑.