花间一壶酒

导航

04 2012 档案

java 实现堆排序
摘要:package com.wrh.study.dataStructure.heap;/** * The operation of the heap sift up * @author wrh * */public class Heap {// private int[] a; //private int size; /** * sift the element up * @param b the heap * @param i the index of the sifted element */ public int[] sif... 阅读全文

posted @ 2012-04-16 16:03 wrh526 阅读(262) 评论(0) 推荐(0)

Java文件读写简单方法
摘要:本文章提供一个简单的文件读取方法:具体代码如下:package com.wrh.java.microblg.io;/* * FileOperate.java 2012/03/20 * Copyright (c) wrh * Beijing, Chaoyang, 100101 * China * All rights reserved * */import java.io.*;import java.util.ArrayList;/** * The interface of file operate include read files and write files etc. * * @v.. 阅读全文

posted @ 2012-04-10 14:57 wrh526 阅读(205) 评论(0) 推荐(0)

Java 实现从控制台接受输入Scanner类
摘要:import java.util.Scanner;public class Input{/*** @param args* author:wrh 2012.04.09*/public static void main(String[] args) { System.out.println("请输入内容:"); Scanner sc = new Scanner(System.in); String input = sc.next(); int a = sc.nextInt();}} 阅读全文

posted @ 2012-04-09 17:20 wrh526 阅读(226) 评论(0) 推荐(0)