Bom dia, ajuda básica. O que está errado no seguinte código? Netbeans…
import java.util.Scanner;
/*
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
*/
/**
*
-
@author luiz_
*/
public class Soma2Numeros {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner input = new Scanner (System.in);int number1;
int number2;
int sum;System.out.print ("Enter first integer: ");
number1 = input.nextInt();
System.out.print("Enter second integer: ");
number2 = input.nextInt();
sum = number1 + number2;System.out.printf (“Sum is %d%n”, sum);
}
-
}
Erro compilador:
:Erro: Não foi possível localizar nem carregar a classe principal soma.pkg2.numeros.Soma2Numeros
C:\Users\luiz_\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
FALHA NA CONSTRUÇÃO (tempo total: 0 segundos)
