+ 1

int a=20, b=15;

Explain me the Java program .

13th Feb 2025, 11:34 AM
Sourojit Kundu
Sourojit Kundu - avatar
2 odpowiedzi
+ 4
Sourojit Kundu , this code is very simple, so it could be explained without any problem. > but it would make more sense for you to start **learning** from sololearn tutorials (e.g. `introduction to java`) instead of asking this question. > you have joined sololearn just 11 minutes ago, so you should take some time to think about how and what to start.
13th Feb 2025, 11:50 AM
Lothar
Lothar - avatar
+ 3
Sourojit Kundu 👉 Java lets to declare multiple variables of same type in one line by separating them with a comma. 👉 You can also initialize a variable at same time it is declared by following the variable with = and starting value. So int a=20, b=15; does following - 👉 Creates variable called "a" which stores integers 👉 Assigns starting value 20 to "a" 👉 Creates variable called "b" which also stores integers 👉 Assigns starting value 15 to "b"
13th Feb 2025, 10:52 PM
Shardis Wolfe