Computer Science, asked by akanksha448, 7 months ago

Find out the error and the reason for the error in the following code. Also write the corrected code. a, b = "5.0","10.0"​

Answers

Answered by rohitkhajuria90
0

In python you can write the expression as it is

a, b = "5.0","10.0"

But in java, the expression is not correct

Because Java do not accept the input in this form

Either you need to create a String array

String[] a = {"5.0","10.0"};

Or

You need to declare two separate strings

String a = "5.0";

String b = "10.0";

Similar questions