摘要: Math.pow(x,y)调用Math类的pow()方法计算幂x^y1、StringBuffer类字符串缓冲区StringBuffer可以存储和操作字符串,它支持可变的字符串,它的对象可以扩充和修改。 StringBuffer类构造方法 构造方法 说明 publ... 阅读全文
posted @ 2018-10-24 00:55 古往今夕 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 公式中A(n,m)为排列数公式,C(n,m)为组合数公式。import java.util.Scanner;public class Test{ static void inputArray(int[] k){ for(int i = 0;i<k.length;i... 阅读全文
posted @ 2018-10-21 16:50 古往今夕 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1、什么是对象,什么是面向对象,什么是面向对象开发? 2、从100米落下一球,每次反弹原高一半,问第10次的反弹高和第10次的落地时经过总长? 3、【编程题】有一对不会死的兔,三个月后开始每一个月生一对和自己一样的兔,求第n个月(n>0,且n属于整数)兔子总数? 4、... 阅读全文
posted @ 2018-10-21 16:35 古往今夕 阅读(74) 评论(0) 推荐(0) 编辑
摘要: String类的多种常用方法 char charAt(int index) 获取给定的Index处的字符 int compareTo(String anotherString) 按照字典的方式比较两个字符串 int compareToIgnoreCase(... 阅读全文
posted @ 2018-10-20 00:42 古往今夕 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 图:public class ArrayTest2{ public static void main(String[] args){ char[][] a = new char[6][]; for(int i =0;i<6;i++){ a[i] = new c... 阅读全文
posted @ 2018-09-28 14:50 古往今夕 阅读(136) 评论(0) 推荐(0) 编辑
摘要: public class ArrayAndRan{ public static void main(String[] args){ int a =0; int num[] = new int[30]; for(int i=0;i<num.length;i++){... 阅读全文
posted @ 2018-09-28 14:31 古往今夕 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 图形:public class ArrayTest{ public static void main(String[] args){ char[][] a = new char[9][9]; for(int i=1,h=0;i5&&j5&&j<=(10-i)*2... 阅读全文
posted @ 2018-09-28 14:18 古往今夕 阅读(257) 评论(0) 推荐(0) 编辑