0

Someone please help to rectify

public class Test { public static void main (Sring args[]) { int no = 22; { if (no%2!=0) System.out.println ("weird"); else if (no%2=0) System.out.println("not weird"); else System.out.println("dont worry"); } } }

10th Aug 2019, 5:56 PM
Ankush Raj
Ankush Raj - avatar
1 Antwort
+ 5
Ankush Raj , change "Sring" to "String". In the else if clause put "==", instead of "=".
10th Aug 2019, 6:03 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar