-
-
-
-
}
}
">Hi, all where we will use this scenario like an abstract class with out abstract methods may i know what is the use of this class?when ur not creating the object and not implementing any of the methodpublic abstract class DemoAbstract { public static void main(String args[]) { System.out.println("inside main"); } }
-
-
else if (month==3||month==4||month==5)
season = "spring";
else if (month==6||month==7||month==8)
season = "summer";
else if (month==9||month==10||month==11)
season = "autumn";
else
season = "bogus month";
System.out.println(season);
}
}">Although the output of following is spring, but how can we use the command line argument for the same program? pls solve thisthanks in advanceclass Ifelse{public static void main(String arr[]){int month=4;String season;if (month==12||month==1||month==2)season = "winter";else if (month==3||month==4||month==5)season = "spring";else if (month==6||month==7||month==8)season = "summer";else if (month==9||month==10||month==11)season = "autumn";elseseason = "bogus month";System.out.println(season);}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Java Interview Questions
Ans