+ 2
Can you fix this there's no output
class Genre { public static void main(String[] args) { String comedy,horror,romance,action; Genre(){ String comedy = "dwarves must be crazy"; String horror = "the nun"; String romance = "after"; String action = "taken"; } public void display() { System.out.println("Comedy:"+comedy +"\n"+ "horror : "+ horror +"\n"+ "Romance: " + romance "\n"+ "Action: "+ action ); } public static void main(String[] args) { System.out.println(Genre); } }
3 Antworten
+ 4
https://code.sololearn.com/chKg2qyAFTaf
// Keep learning & happy coding :D
+ 3
There's two main function definition. And some more minor errors. I've fixed them below
https://code.sololearn.com/cv8V1P6M8tu1/?ref=app
+ 3
Thank you