+ 2

Everyone tell me the way to make this code work

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String name = sc.nextLine(); String game = sc.nextLine(); System.out.println = (name+"is bad"+game+"iqs bad"); System.out.println = (game+"is bad"); } }

8th Feb 2025, 1:18 PM
Cubiker647
Cubiker647 - avatar
3 Answers
+ 6
You don't need the = for your print line. System.out.println("text here"); For println do you have a capital "i" = "I" or a lower-case "L"? If you add the code as per this guide, we can troubleshoot it more easily. https://sololearn.com/compiler-playground/Wek0V1MyIR2r/?ref=app
8th Feb 2025, 3:28 PM
Ausgrindtube
Ausgrindtube - avatar
+ 5
It almost works, except the println() is wrong. No equal sign "=" is needed for println() method.
8th Feb 2025, 3:30 PM
Wong Hei Ming
Wong Hei Ming - avatar
+ 2
I think I, made the mistake printIn too...
9th Feb 2025, 5:32 PM
Daniel
Daniel - avatar