易截截图软件、单文件、免安装、纯绿色、仅160KB

JAVA排序算法测试类

import java.util.Random;
 
/**
 * 排序测试类
 *
 * 排序算法的分类如下:
 * 1.插入排序(直接插入排序、折半插入排序、希尔排序);
 * 2.交换排序(冒泡泡排序、快速排序);
 * 3.选择排序(直接选择排序、堆排序);
 * 4.归并排序;
 * 5.基数排序。
 *
 * 关于排序方法的选择:
 * (1)若n较小(如n≤50),可采用直接插入或直接选择排序。
 *  当记录规模较小时,直接插入排序较好;否则因为直接选择移动的记录数少于直接插人,应选直接选择排序为宜。
 * (2)若文件初始状态基本有序(指正序),则应选用直接插人、冒泡或随机的快速排序为宜;
 * (3)若n较大,则应采用时间复杂度为O(nlgn)的排序方法:快速排序、堆排序或归并排序。
 *
 */
public class SortTest {
 
       /**
        * 初始化测试数组的方法
        * @return 一个初始化好的数组
        */
       public int[] createArray() {
              Random random = new Random();
              int[] array = new int[10];
              for (int i = 0; i < 10; i++) {
                     array[i] = random.nextInt(100) - random.nextInt(100);//生成两个随机数相减,保证生成的数中有负数
              }
              System.out.println("==========原始序列==========");
              printArray(array);
              return array;


相关文档:

delphi + java 的分布式应用思考

delphi  + java 的分布式应用思考
用delphi做界面层  java业务逻辑层 这样看上去很美吧?
具体的实现
java 做业务逻辑层 应该有多种选择 企业级的有EJB3, 轻量级的有spring
目前在学习ejb3,感觉用来做业务逻辑层真的很不错。spring还没有了解
界面层用delphi,RAD应该是delphi的优势。
关键的问题的如果把 ......

delphi + java 的分布式应用

结合Delphi
客户端桌面开发的优势和Java的稳健强壮特性,采用Delphi
Client + Java Server的系统架构应该是很有市场的,经过一段时间的实际项目实践,实现架构是这么实现的,供讨论:
1.后台应用服务层可采用基于Spring+Hibernate的轻量级J2EE实现,并使用Apache XML-RPC
提供客户端调用接口;
2.前台采用 Delphi
......

rxtx取代javax.comm实现Java跨平台设备端口通信

from Rxtx
This page is for general content regarding the use of rxtx. Feel free to add your own content.
Using RXTX In Eclipse
Deploying JAVA with RXTX
I wrote an app several months ago using javax.comm on windows. Sun has left me high and dry. rxtx help!
download ftp://ftp.qbang.org/pub/rx ......

IBM Java 面试题

1.what is oracle.
2.what is major differenece oracle8i and oracle9i.
4.tell me some thing ur self.
5.please tell me about oops.
6.what is single inheritance.
7.what is multiple inheritance.
8.can java support multiple inheritance.
9.what is interface.
10.what is differenec between abstract c ......

Java服务端接受get方式传送的汉字转码方法

1.用new String(request.getParameter("name").getBytes("ISO-8859-1"),"GBK") 方式进行转码
2.设置tomcat:在tomcat的conf目录下找到server.xml文件,在Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号