is there any program which do not contain a semi colon ? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
- 2

is there any program which do not contain a semi colon ?

20th Aug 2016, 9:38 AM
Mansi Sharma
Mansi Sharma - avatar
4 Antworten
+ 2
yes, in below is a program without ; public class MyClass { public static void main(String[ ] args) { } }
20th Aug 2016, 9:40 AM
Tiger
Tiger - avatar
+ 1
your question seems pointless but actually whenever there's statement there is ;
20th Aug 2016, 11:02 AM
Henok
Henok  - avatar
0
is this also correct? public class hello{ public static void main (String [] args){ if(System. out.println("hello")) { } } }
20th Aug 2016, 9:48 AM
Mansi Sharma
Mansi Sharma - avatar
0
actually semi colon tells compiler that this is the end of statement.
20th Aug 2016, 3:48 PM
Shyam sunder Reddy
Shyam sunder Reddy - avatar