赞助
上一页 1 2 3 4 5 6 7 8 9 10 ··· 45 下一页
摘要: 构造方法:类中的特殊方法,主要用于创建对象 特点: 名称与类名完全相同; 没有返回值类型; 创建对象时,触发构造方法的调用,不可通过句点手动调用 注意:如果没有在类中显示定义构造方法,则编译器默认提供无参构造方法 package com.ht.t1.constractor; public class 阅读全文
posted @ 2022-05-22 13:52 Tsunami黄嵩粟 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 有些情况下,对象的同一种行为可能存在多种实现过程 例如:人对象的吃行为,吃饭和吃药的过程就存在差异 到底采用那种形式,需要取决于调用者给定的参数 public class Person { public static void main(String[] args) { // TODO Auto-g 阅读全文
posted @ 2022-05-21 22:38 Tsunami黄嵩粟 阅读(24) 评论(0) 推荐(0) 编辑
摘要: package com.ht.leader.oop; public class TestOOPDOG { public static void main(String[] args) { // TODO Auto-generated method stub int a = 0;//局部变量先赋值再使 阅读全文
posted @ 2022-05-15 18:16 Tsunami黄嵩粟 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 什么是程序:程序就是为了模拟现实世界,解决现实问题而使用计算机语言编写的指令集合 什么是对象:面向对象思想 一切客观的事物就是对象,万物皆对象 任何对象,一定具有自己的特征和行为:特征:称为属性,一般为名词,代表对象有什么。行为:称为方法,一般为动词,代表对象能做什么 分析一个对象都有什么(属性) 阅读全文
posted @ 2022-05-14 23:43 Tsunami黄嵩粟 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 先看样式 var _t = this; var setting = { view: { fontCss: { color: "#5E5F61" }, showIcon: true, showLine: false }, data: { simpleData: { enable: true } }, 阅读全文
posted @ 2022-05-06 17:19 Tsunami黄嵩粟 阅读(520) 评论(0) 推荐(0) 编辑
摘要: pubilc class Test { pubilc static void main(String[] args){ int rows= 5; int[][] yh = new int[rows][]; //创建多个不同长度的二维数组 for(int i = 0 ; i < rows;i++){ 阅读全文
posted @ 2022-05-03 13:50 Tsunami黄嵩粟 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 概念:一维数组中的一维数组;数组中的元素,还是数组; pubilc class Test{ pubilc static void main(String[] args){ int[][] nums = new int[3][5]; nums[0][0] = 10;//第一行。第一列 nums[0][ 阅读全文
posted @ 2022-05-03 12:57 Tsunami黄嵩粟 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 冒泡排序:相邻的二个值比较大小,互换位置 选择排序:固定值与其他值依次比较大小,互换位置 JDK排序:java.util.Arrays.sort(数组名)//JDk提供升序 pubilc class Test{ pubilc static void main(String[],args){ int[ 阅读全文
posted @ 2022-05-02 20:45 Tsunami黄嵩粟 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 概念:可接收多个同类型实参,个数不限,使用方式与数组相同 语法:数据类型...形参名//必须定义在形参列表的最后,且只能有一个 public class Test{ pubilc static void main(String[] args){ int[] numbrs = {1,2,3,4,5,6 阅读全文
posted @ 2022-05-02 18:51 Tsunami黄嵩粟 阅读(14) 评论(0) 推荐(0) 编辑
摘要: pubilc class TestParams{ public static void main(String[] args){ int[] nums = new int()[11,22,244,635,3542] print(nums ) } //引用数据类型。赋值也好,传参也好,操作的都是地址 阅读全文
posted @ 2022-04-23 18:34 Tsunami黄嵩粟 阅读(26) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 45 下一页