+ 1

Why semicolon should not be placed at the end of method and class

11th May 2018, 1:01 PM
shanthini shanthu
shanthini shanthu - avatar
2 Respuestas
+ 3
" Why don't we use semicolon at the end of class in java? " https://stackoverflow.com/questions/30773597/why-dont-we-use-semicolon-at-the-end-of-class-in-java " Why do we not use semicolon with method in Java? " https://www.quora.com/Why-do-we-not-use-semicolon-with-method-in-Java
11th May 2018, 1:07 PM
Rahul George
Rahul George - avatar
+ 1
Semicolon is used to mark the end of a single statement. Therefore the computer recognizes it while running the program. Note that jumping to a new line doesn't end the statement. Also you can code the entire program in a single line if you use semicolons properly.
12th May 2018, 10:08 AM
Pubudu Bandara
Pubudu Bandara - avatar