奥雷迪尔

导航

2017年7月11日 #

数字转成字母型

摘要: // TODO Auto-generated method stub /* * 输入一个数字转换为一个汉字读法字符串 */ while(true){ System.out.println("请输入一个数字:"); Scanner scan = new Scanner(System.in); int 阅读全文

posted @ 2017-07-11 18:14 奥雷迪尔 阅读(317) 评论(0) 推荐(0) 编辑

求并集

摘要: // 并集 public static Integer[] union1(int[] arr1,int[] arr2){ int index = 0; int[] newarr = new int[arr1.length+arr2.length];// 把传进来的数组添加到一个新数组里面。 for( 阅读全文

posted @ 2017-07-11 17:28 奥雷迪尔 阅读(116) 评论(0) 推荐(0) 编辑

求子集、交集

摘要: // 子集 public static void subArrays2(int[] arr) { int[] temp = new int[arr.length]; int index = 0; for (int i = 0; i < arr.length; i++) { for (int j = 阅读全文

posted @ 2017-07-11 17:25 奥雷迪尔 阅读(118) 评论(0) 推荐(0) 编辑

java数学函数Math类中常用的方法

摘要: Math类提供了常用的一些数学函数,如:三角函数、对数、指数等。一个数学公式如果想用代码表示,则可以将其拆分然后套用Math类下的方法即可。 Math.abs(12.3); //12.3 返回这个数的绝对值 Math.abs(-12.3); //12.3 Math.copySign(1.23, -1 阅读全文

posted @ 2017-07-11 10:27 奥雷迪尔 阅读(472) 评论(0) 推荐(0) 编辑

方法的递归(极客学院笔记)

摘要: 1、递归调用是一种特殊的调用形式,就是方法自己调自己。 阅读全文

posted @ 2017-07-11 00:16 奥雷迪尔 阅读(132) 评论(0) 推荐(0) 编辑