0

Can anyone help me with the Java Drawing Class project?

So, my code is this: import java.util.Scanner; public class Program { Scanner myObj = Scanner(System.in); int pupils = myObj.nextInt(); int pencils = myObj.nextInt(); System.out.println("Total: " +(pupils*pencils)); } And yet, I'm getting no output. Any reason why I am getting no output?

9th Dec 2022, 8:23 PM
Vincent Nowak
1 Odpowiedź
0
There are two errors. You don't have the "main". You are missing "new" in your Scanner line. https://code.sololearn.com/c7Vu5qfgPL4R/?ref=app
9th Dec 2022, 8:37 PM
Ausgrindtube
Ausgrindtube - avatar