摘要:
1.数组的简单介绍:概念:同一种类型数据的集合,其实数组就是一个容器;数组的好处:可以自动给数组中的元素从0开始编号,方便操作这些元素;格式1:元素类型[] 数组名 = new 元素类型[元素个数或者数组长度];示例:int[] arr = new int[5];格式2:元素类型[] 数组名 = n... 阅读全文
摘要:
1.函数的定义:函数就是定义在类中的具有特定功能的一段独立的小程序;函数也称为方法;2.函数的格式实例和讲解:class FunctionDemo{ public static void main(String[] args) { int c = add(3,4); System.out.print... 阅读全文