摘要:
13.在Java中调整数组大小public class resizeArray { /** * Reallocates an array with a new size, and copies the contents of the old * array to the new array. * * @param oldArray * the old array, to be reallocated. * @param newSize * the new array size. * @return A new array with ... 阅读全文
阅读排行榜
JAVA功能代码《6》----用Java实现屏幕截图
2011-05-20 17:39 by java线程例子, 240 阅读, 收藏,
摘要:
6.用Java实现屏幕截图import java.awt.Dimension;import java.awt.Rectangle;import java.awt.Robot;import java.awt.Toolkit;import java.awt.image.BufferedImage;import java.io.File;import javax.imageio.ImageIO;/******************************************************************* * 用Java实现屏幕截图 * 该JavaBean可以直接在其他Jav 阅读全文
android:installLocation简析
2012-06-06 11:00 by java线程例子, 239 阅读, 收藏,
摘要:
在Froyo(android 2.2,API Level:8)中引入了android:installLocation.通过设置该属性可以使得开发者以及用户决定程序的安装位置.android:installLocation隶属于AndroidManifest.XML中的manifest节点.如下所示:<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="string" android:sharedUserId="string" a 阅读全文
Linux operating system (Ubuntu) 学习-1
2011-09-06 20:25 by java线程例子, 239 阅读, 收藏,
摘要:
Ubuntu操作系统中计算器的使用1. 登陆系统2. 输入“bc”启动计算器程序3. 进行相关的计算(注意:可以用scale变量设定计算结果所保留的小数位数目 例如:你要想保留小数点后5位数,可以输入命令“scale=5”)4.输入“quit”退出计算器程序 阅读全文
JAVA功能代码《12》----使用NIO快速复制文件
2011-05-21 17:15 by java线程例子, 239 阅读, 收藏,
摘要:
12.使用NIO快速复制文件public static void fileCopy(File in, File out) throws IOException { FileChannel inChannel = new FileInputStream(in).getChannel(); FileChannel outChannel = new FileOutputStream(out).getChannel(); try { inChannel.transferTo(0, inChannel.size(), outChannel); // original -- apparent... 阅读全文
浙公网安备 33010602011771号