这就是我到目前为止所做的。我创建了这个类,构造函数 公共类示例 { private int []值; private int min; private int max; 扫描仪键=新扫描仪(System.in); 公示例() { 值= 20; min = 0; max = 20; } public int ReadSize(int size) { System.out.println("输入数组的大小。) size = key.nextInt(); for(int min = 0; min< size.length; min ++) { 值[min] = key.nextInt(); } } I need help in writing the addition , subtraction etc. method. eample the add method must add large intergers,say 2500 + 69587562. each number is entered in the subscript individually. this is what i have done so far.I created the class,constructors public class Example{private int[] values;private int min;private int max; Scanner Key= new Scanner(System.in); public Example(){values=20;min=0;max=20;} public int ReadSize( int size){ System.out.println("Enter the size of the array.")size=key.nextInt(); for(int min=0; min<size.length;min ++){values[min]=key.nextInt();}} 您希望下次发布co时使用代码标记德。您的构造函数未正确初始化该数组。如果你想让数组存储20个整数,你可以You will want to use code tags next time when posting code. Your constructor does not correctly initialize the array. If you want the array to store 20 integers you do 展开 | 选择 | Wrap | 行号 如果您在同一问题上需要更多帮助,请在此相同的帖子中发帖为同一问题启动新线程If you need more help on this same problem, post in this same thread instead of starting a new thread for the same problem 下次发布代码时,您将需要使用代码标记。您的构造函数未正确初始化该数组。如果你想让数组存储20个整数,你可以You will want to use code tags next time when posting code. Your constructor does not correctly initialize the array. If you want the array to store 20 integers you do 展开 | 选择 | Wrap | 行号 这篇关于关于我的问题的更多信息,在java数组中添加大型整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 21:45