System.out.println(""+++k)

i have give statement should i print with the help of System.out.println()int k=1;System.out.println("Hello"+++k);
[135 byte] By [Shambhu98a] at [2007-10-3 7:15:22]
# 1
I have no idea what you are asking/saying. Please clarify. However I'm going to guess you are getting a compiler error due to +++. Try this:System.out.println("Hello" + ++k);Note that there is a space between the 1st and 2nd +
floundera at 2007-7-15 2:11:58 > top of Java-index,Java Essentials,Java Programming...
# 2
System.out.println("Hello"+ ++k);
orbacha at 2007-7-15 2:11:58 > top of Java-index,Java Essentials,Java Programming...
# 3
Thanks
Shambhu98a at 2007-7-15 2:11:58 > top of Java-index,Java Essentials,Java Programming...
# 4
Java scans the input file for tokens from left to right, so something like a+++k is interpreted as (a++)+k. In your case the post-increment operator ++ cannot be applied to a string value, so you get a compiler error. If what you meant was a+(++k) you should write that.
jsalonena at 2007-7-15 2:11:58 > top of Java-index,Java Essentials,Java Programming...