0
Please help me
package input.pkg1; import java.util.Scanner ; public class Input1 { public static void main(String[] args) { int number1, number2, total; Scanner Info = new Scanner (System.in); System.out.println("Enter First Number: "); number1 = Info.nextInt(); System.out.println("Enter Second Number: "); number2 = Info.nextInt(); total= number1 +number2; System.out.println("Total = "+ total); Info.close();
3 Antworten
+ 5
Moneerah Alqahtani That said:
1. What is the line "package input.pkg1;" for?
2. Review the lesson on formatting output.
+ 4
Moneerah Alqahtani Your question is missing vital information for us to help you. Pls edit your question description and add:
1. A tag with the language name
2. A description of the task
3. A link to your code in Code Playground
4. An explanation of your difficulties
This way, we'll know what you're trying to do and what to help you in.
+ 3
Moneerah Alqahtani the code is missing two closing braces - one for main() and one for class Input1.
I am not familar with the package keyword, but the warning goes away if you comment out that line.