Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/370.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
java中如何对ResultSet返回的2D数组进行算术运算_Java_Multidimensional Array - Fatal编程技术网

java中如何对ResultSet返回的2D数组进行算术运算

java中如何对ResultSet返回的2D数组进行算术运算,java,multidimensional-array,Java,Multidimensional Array,我在java中有一个方法,它给出了一个具有不同列的表。其中一列是beam_current,其值为直到220的实数类型。现在我只想显示表中beam_current值最接近10,20,30..直到220的行。 为了做到这一点,我必须取一个变量并将其赋值为10,然后用beam_当前值减去它,我得到的最小值应该显示在表中。必须在while(rs.next)中运行for循环,例如 while(rs.next) { 对于(f=10;fI)假设循环应为(f=10;f@ajb我不知道如何处理我的问题。我只想要那

我在java中有一个方法,它给出了一个具有不同列的表。其中一列是beam_current,其值为直到220的实数类型。
现在我只想显示表中beam_current值最接近10,20,30..直到220的行。

为了做到这一点,我必须取一个变量并将其赋值为10,然后用beam_当前值减去它,我得到的最小值应该显示在表中。必须在while(rs.next)中运行for循环,例如

while(rs.next)
{

对于(f=10;fI)假设循环应为(f=10;f@ajb我不知道如何处理我的问题。我只想要那些非常接近值10,20,,,高达220的行。
while(rs.next)
{
  for(f=10;f<=220;f+10)`**//f+10 how to do in for?**`
 {
   variable=rs.getInt(2)`**//beam_current is second column**`
   f-=variable;
    code for least value of f`**//(how to code for it???)**`

 }
}