有什么区别?
Object foo = "something"; String bar = String.valueOf(foo);
和
Object foo = "something"; String bar = (String) foo;
相似问题