Lars Bogren created NETBEANS-5988:
-------------------------------------
Summary: Print fungerar inte om man anväder Scanner
Key: NETBEANS-5988
URL: https://issues.apache.org/jira/browse/NETBEANS-5988
Project: NetBeans
Issue Type: Bug
Environment: netbeans
Reporter: Lars Bogren
import java.util.*;
public class Addition {
public static void main(String[] args) {
// create a Sanner to obtain input from the commad window
Scanner input = new Scanner(System.in);
System.out.print("Enter first integer: "); //promt
int number1 = input.nextInt(); //read first number from user
System.out.print("Enter second integer: "); //promt
int number2 = input.nextInt(); //read first number from user
int sum = number1 + number2; //add numbers, total in sum
System.out.printf("Sum = %d%n", sum); // display sum
}// end method main
}// end class Addition
Detta print sats fungerar inte utan texten kommer efter båda inmatningarna
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists