0

Does Java Support Indentation like Python?

4th Feb 2021, 7:51 AM
Nalayak_
Nalayak_ - avatar
5 Respuestas
+ 11
SauravK.__ Indentation is not necessary in java because we have curly braces {} for multiline statements. In python we don't have this {} that's why we need indentation.
4th Feb 2021, 8:03 AM
A͢J
A͢J - avatar
+ 6
SauravK.__ Python is structured in the way if you don't put indentation then compiler will confuse which code of blocks will be execute first. That's why python gives error. Actually indentation is use to indicate a block of code. Also it makes readability of code. So it is very important.
4th Feb 2021, 8:21 AM
A͢J
A͢J - avatar
+ 1
I felt the same but there was some doubt ! Thanks I Am AJ !
4th Feb 2021, 8:06 AM
Nalayak_
Nalayak_ - avatar
+ 1
Thanks bhaiya I Am AJ !
4th Feb 2021, 8:31 AM
Nalayak_
Nalayak_ - avatar
0
Btw can you tell me importance of indentation?
4th Feb 2021, 8:06 AM
Nalayak_
Nalayak_ - avatar