What does "1"+2+4 evaluate to?
Answers were Sorted based on User's Feedback
Answer / hk
Anything which follows string is converted to String.
Hence, "1" is string, and the digits 2 and 4 which comes
after this, also become part of string only.
So the answer is 124
Is This Answer Correct ? | 70 Yes | 2 No |
Answer / hk & kmbkrishnan
Write a program in java and execute it with the following
code bellow:
System.out.println("1"+2+4);
And see the output.
Thanks & Regards
Hk and Kmbkrishnan
Is This Answer Correct ? | 28 Yes | 4 No |
Answer / akash
it is 124 as it is ins tring format and after that what ever
b there is considered as string
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / shikha
answer is 124 as "1" in the starting is consider as a
string, therefore all other nos after that is consider as a
string unless brackets are not used.
Is This Answer Correct ? | 7 Yes | 0 No |
How to set the focus in an element using javascript?
hello sir my name is naga sekhar i completed my b-tech in 2011 with 61% in IT streme.I completed my core and advanced java coure before 8months back.Still i did not get the job.i tried so many times.and i went to some interviews but no use.now i want to get the job in software sector
Is javascript a security risk?
Is null in javascript?
What is difference between callback and promise?
When do we use JSON.stringify()?
How do you round a value in javascript?
Write the point of difference between web-garden and a web-farm?
How to modify the url of the page without reloading the page?
How to create an input box?
What is console.log() and why it is used?
How do you name a variable in javascript?