Java println语句中带有字符串的+符号的含义 [英] Meaning of + symbol with Strings in Java println statement
本文介绍了Java println语句中带有字符串的+符号的含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是Java的新手。以下是什么意思?
I'm new to Java. What does the below mean?
(加法)+登录 println
System.out.println(计数是:+ i);
推荐答案
加号运算符具有双重含义。它也是一个连接运算符。由于Count is:类型为 String
,i( Integer
?)将转换为字符串
以及。
The plus operator has a double meaning. Its a concatination operator as well. As the "Count is:" is of type String
the "i" (Integer
?) is converted to a String
as well.
我没看过它,因为我更喜欢参考书,但有些人真的喜欢这本书< a href =http://rads.stackoverflow.com/amzn/click/0596009208 =nofollow> Head First Java ,因为它似乎解释了概念。
I haven't read it as I prefer reference books, however some really like the Book Head First Java as it seems to explain concepts.
这篇关于Java println语句中带有字符串的+符号的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文