import java.util.*;
public class strings {
public static void main (String [] args) {
Scanner keyboard = new Scanner(System.in);
System.out.print("Type your first integer: ");
int first = keyboard.next();
System.out.print("Type your seconds integer : ");
int second = keyboard.next();
System.out.print("The sum of your two integers are:");
}
}
Run Code Online (Sandbox Code Playgroud)
我不知道为什么我在字符串上得到2个错误无法转换为int.