java中获得数组中最小的数
public static void main(String[] args)
{
Integer[] arrInt = new Integer[6];
arrInt[0] = 123;
arrInt[1] = 3453;
arrInt[2] = 345;
arrInt[3] = 23;
arrInt[4] = 11;
arrInt[5] = 345;
int temp = 0;
for (int i = 0; i < arrInt.length; i++)
{
if(i == 0)
{
temp = arrInt[i];
}
else
{
temp = temp < arrInt[i]?temp:arrInt[i];
}
}
System.out.println(temp);
}
相关文档:
System.out.println(2|0); //0010 0000 =>0010 = 2
System.out.println(2|1); //0010 0001 =>0011 = 3
System.out.println(3|2); //0011 0010 =>0011 = 3
System.out.println(3&2); //0011 0010 =>0010 = 2
/*
在java中0代表假, 1代表真
00011|0010 从右到左比较0|1 = 1, 1|0 = ......
create or replace procedure updateProject is
begin
update project p set p.total_intend_gather =
(select sum(ig.gather_sum) from intend_gather ig where ig.project_number=p.project_number);
up ......
1、Oracle8/8i/9i数据库(thin模式)
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@localhost:1521:orcl"; //orcl为数据库的SID
String user="test";
String password="test";
Connection conn= DriverManager.getC ......
目 录
1 集合框架... 2
1.1 集合框架概述... 2
1.1.1 容器简介... 2
1.1.2 容器的分类... 4
1.2 Collection. 5
1.2.1  ......
/************************************************************************
* & ......