我想将此代码从Objective C转换为Swift 3:
context Person::drinkBeer()
pre Adult: self.age >= 21
所以我写这个但是Objective C中的输出有64个计数,而我的Swift代码中有44个count.Therefor我认为我的swift代码错了:
System.out.print("items: ");
boolean first = true;
for (String item : stringList) {
if (! first)
System.out.print(", ");
System.out.print(item);
first = false;
}
System.out.println();