printf can not print an integer
Robert Field
robert.field at oracle.com
Sat Apr 25 22:50:50 UTC 2015
Right, we could also have a shortcut for print (as opposed to printf):
void print(Object arg) { System.out.print(arg); }
Yes?
-Robert
On 04/23/15 07:21, Remi Forax wrote:
> Ok, I see.
> perhaps a simple Python style 'print' should be added in that case ?
>
> regards,
> Rémi
>
> On 04/23/2015 04:17 PM, andrei.eremeev wrote:
>> In REPL, printf is not a C-style printf. REPL's printf has
>> parameters: String a, Object...b, where 'a' is a template.
>>
>> Andrei
>>
>> On 04/23/2015 05:11 PM, Remi Forax wrote:
>>> 'printf' should be a method that takes an Object as parameter and
>>> not a String.
>>>
>>> -> printf(2)
>>> | Error:
>>> | incompatible types: int cannot be converted to java.lang.String
>>> | printf(2)
>>> | ^
>>>
>>> cheers,
>>> Rémi
>>>
>>>
>>
>
More information about the kulla-dev
mailing list