+ 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); } }

30th Nov 2021, 1:34 AM
Mirasol Sontousidad
Mirasol Sontousidad - avatar
3 Answers
+ 4
https://code.sololearn.com/chKg2qyAFTaf // Keep learning & happy coding :D
30th Nov 2021, 2:52 AM
SoloProg
SoloProg - avatar
+ 3
There's two main function definition. And some more minor errors. I've fixed them below https://code.sololearn.com/cv8V1P6M8tu1/?ref=app
30th Nov 2021, 2:39 AM
Rishi
Rishi - avatar
+ 3
Thank you
30th Nov 2021, 2:54 AM
Mirasol Sontousidad
Mirasol Sontousidad - avatar