小编Aro*_*des的帖子

Java使用String值作为Variable

我有一个参数国家的方法.此参数仅包含国家/地区的缩写.在方法中,我想打印国家的全名,没有开关案例或东西,但使用预定义的字符串

final String VA="Vatikan";
String country="VA";
system.out.println(country);
//Is it possible that it Prints Vatikan now?
//I know not with that code but is there a possibillity to do that.
Run Code Online (Sandbox Code Playgroud)

java

0
推荐指数
1
解决办法
108
查看次数

标签 统计

java ×1