《Cracking the Coding Interview》——第14章:Java——题目5
2014-04-26 19:11
531 查看
2014-04-26 19:06
题目:Java中的对象反射机制是什么?有鼠么用?
解法:完全不了解,因为java编程经验太少,完全没用过。查了一些资料后,感觉反射机制是个强大并需要边用边体会的强大工具。能灵活处理各种动态类型下的问题。
代码:
题目:Java中的对象反射机制是什么?有鼠么用?
解法:完全不了解,因为java编程经验太少,完全没用过。查了一些资料后,感觉反射机制是个强大并需要边用边体会的强大工具。能灵活处理各种动态类型下的问题。
代码:
// 14.5 Tell me something about Object Reflection in java. // Answer: // 1. class type, constructor, member method, these are a few characteristics of a class // 2. the Object Reflection is a collection of tool classes, it is able to handle the situation when you know you want certain behavior, but don't know exactly what type of class you need. // 3. Unlike generics, it mainly deal with member methods and constructors, while generics focus more about data. // 4. you may get a specific constructor, a member method with customized constraints. public class TestJava { public static void main(String[] args) { return; } }
相关文章推荐
- 《Cracking the Coding Interview》——第14章:Java——题目6
- 《Cracking the Coding Interview》——第14章:Java——题目1
- 《Cracking the Coding Interview》——第14章:Java——题目2
- 《Cracking the Coding Interview》——第14章:Java——题目3
- 《Cracking the Coding Interview》——第14章:Java——题目4
- 《Cracking the Coding Interview》——第3章:栈和队列——题目7
- 《Cracking the Coding Interview》——第5章:位操作——题目6
- 《Cracking the Coding Interview》——第18章:难题——题目12
- 《Cracking the Coding Interview》——第7章:数学和概率论——题目6
- 《Cracking the Coding Interview》——第1章:数组和字符串——题目1
- 《Cracking the Coding Interview》——第4章:树和图——题目1
- 《Cracking the Coding Interview》——第5章:位操作——题目7
- 《Cracking the Coding Interview》——第17章:普通题——题目13
- 《Cracking the Coding Interview》——第18章:难题——题目13
- 《Cracking the Coding Interview》——第7章:数学和概率论——题目7
- 程序员面试题目:Cracking the coding interview 分析与解答
- 《Cracking the Coding Interview》——第8章:面向对象设计——题目4
- 《Cracking the Coding Interview》——第10章:可扩展性和存储空间限制——题目1
- 《Cracking the Coding Interview》——第12章:测试——题目6
- 《Cracking the Coding Interview》——第1章:数组和字符串——题目2