Learning java bronze.
There were the following in the problem collection.
** System.out.print ((3 + 6 * 8/2) + "");// 27
System.out.print (++ a * b ++ + "");// 4 * 5 = 20 **
This is the +""part of the problem, but I recognize that the number is a string,
What about it?
I asked a question because it was not described in the commentary.
Answer # 1
Recognizes that the number is a string
I think that recognition is good.
System.out.printis used, there is no line break
Perhaps the real reason is to separate them with spaces.
System.out (PrintStream) print is print (int) or
print (String), print (char), etc. are overloaded.
Looking at the first question of the questioner,
Is print (int) converted to call print (String)?
It has been confirmed the contents.
The answer is that it is recognized as a conversion method of creating a character string by concatenating a numeric value and a character string.
* A common method is to add an empty character ("").
Why is this conversion carried out on top of that?
Because there are no line breaks, maybe the real reason is to separate them with spaces
Answer # 2
This is the +""part of the problem, but I understand that the number is a string
What about it?
First,""is not a number but a string.
""generates a single space. It is concatenated by
(3 + 6 * 8/2)and
+in front of it.
- how to enclose each element with double quotation after separating python3 list with comma
- excel vba double quotation is added when outputting to a text file
- python single and double quotation
- java - cannot enter data in double type
- java - i want to assign nan to a double type variable and branch depending on whether nan is included or not
- php - i want to remove the double quotation i want to do something like "1" -> 1
- java - i don't understand the problem of double for statement with array
- convert double to string in java
- double quotation in python dictionary
- i would like to know how to use jquery single quotation and double quotation
- java - conservative four arithmetic operators
- batch file - i want to store double quotation in a variable in batch
- java - please explain the processing flow of the double for statement for a two-dimensional array
- c # - double quotation processing in process start argument
- java - it became heavy after double buffering
- Java note learning operators
- python 3x - typeerror: 'method' object is not subscriptable
- python - you may need to restart the kernel to use updated packages error
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - emulator: dsound: could not initialize about the error message directsoundcapture
- android studio - unresolved reference comes out in kotlin
- mysql startup failed [error] innodb: the innodb_system data file 'ibdata1' must be writable
- django - oserror: [winerror 123] the file name, directory name, or volume label syntax is incorrect : '<frozen importlib_boot
- python - importerror: cannot import name md5 error cannot be resolved