参数类型可以分为ref、in、out这三种,默认的都是in。通过引用传递参数, 可使用ref或out关键字。ref和out这两个关键字都能够提供相似的功效,其作用也很像C中的指针变量。它们的区别是:1、把未赋值的变量用作ref参数是非法的,但可以把未赋值的变量用作out参数。在函数使用out参数时,...
分类:
其他好文 时间:
2015-04-13 00:01:06
阅读次数:
391
Find The MultipleTime Limit: 1000MS Memory Limit: 10000K
Total Submissions: 19815 Accepted: 8048 Special Judge DescriptionGiven a positive integer n, write a program to find out a nonzero multiple...
分类:
其他好文 时间:
2015-04-12 21:13:30
阅读次数:
117
My sister installed AirSig last week. She is so exciting about this new techknology and she won't stop writing strange words in the air. She want me t...
分类:
其他好文 时间:
2015-04-12 19:12:45
阅读次数:
133
1.方法的重载(overload)是指一个类中可以定义有相同的名字,但参数不同的多个方法。调用时,会根据不同的参数表选择对应的方法。例如:public class AboutOverload { void max(int a,int b){ System.out.println(...
分类:
其他好文 时间:
2015-04-12 18:57:56
阅读次数:
108
基本示例(Hello World)public class Test { public static void main(String[] args) { // TODO 自动生成的方法存根 System.out.println("Hello World!"); }}注意:在Java中,“函数”.....
分类:
其他好文 时间:
2015-04-12 16:08:19
阅读次数:
165
public static void main(String[] args) { int[] a={23,34,56,7,8,9}; int[] b = new int[a.length]; Scanner scan = new Scanner(System.in); System.out....
分类:
编程语言 时间:
2015-04-12 15:58:05
阅读次数:
160
public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("请输入一个五位正整数:"); int num = scan.nextInt(); Strin...
分类:
编程语言 时间:
2015-04-12 15:56:58
阅读次数:
181
public static void main(String[] args) { int[][] a = new int[2][3]; int[][] b = new int[3][2]; int k = 1; System.out.println("转置前数组:"); for(int i...
分类:
编程语言 时间:
2015-04-12 14:44:58
阅读次数:
126
package javaTrain;
public class offer3 {
public static void main(String args[]) {
int[][] a = {{0,1,2,3},{1,2,3,4},{2,3,4,5},{6,7,8,9}};
System.out.println(find(a,10));
}
public static boole...
分类:
编程语言 时间:
2015-04-12 13:27:38
阅读次数:
134
source-over默认。在目标图像上显示源图像。source-atop在目标图像顶部显示源图像。源图像位于目标图像之外的部分是不可见的。source-in在目标图像中显示源图像。只有目标图像内的源图像部分会显示,目标图像是透明的。source-out在目标图像之外显示源图像。只会显示目标图像之外...
分类:
Web程序 时间:
2015-04-12 13:13:54
阅读次数:
246