单项选择题

A.object A{var str =“”}
B.object A(str:String){}
C.object A{def str =“”}
D.object A{val str =“”}