赞助
posts - 449,comments - 12,views - 11万
05 2022 档案
封装
摘要:概念:尽可能隐藏对象的内部实现细节,控制对象的修改及访问的权限 访问修饰符:private(可将属性修饰为私有,仅本类可见) 阅读全文
posted @ 2022-05-29 22:25 Tsunami黄嵩粟 阅读(8) 评论(0) 推荐(0) 编辑
this的二种使用方式
摘要:package com.ht.TestThis; public class TestThisKey { public static void main(String[] args) { // TODO Auto-generated method stub Student s1 = new Stude 阅读全文
posted @ 2022-05-22 14:34 Tsunami黄嵩粟 阅读(30) 评论(0) 推荐(0) 编辑
构造方法
摘要:构造方法:类中的特殊方法,主要用于创建对象 特点: 名称与类名完全相同; 没有返回值类型; 创建对象时,触发构造方法的调用,不可通过句点手动调用 注意:如果没有在类中显示定义构造方法,则编译器默认提供无参构造方法 package com.ht.t1.constractor; public class 阅读全文
posted @ 2022-05-22 13:52 Tsunami黄嵩粟 阅读(97) 评论(0) 推荐(0) 编辑
方法重载
摘要:有些情况下,对象的同一种行为可能存在多种实现过程 例如:人对象的吃行为,吃饭和吃药的过程就存在差异 到底采用那种形式,需要取决于调用者给定的参数 public class Person { public static void main(String[] args) { // TODO Auto-g 阅读全文
posted @ 2022-05-21 22:38 Tsunami黄嵩粟 阅读(28) 评论(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黄嵩粟 阅读(29) 评论(0) 推荐(0) 编辑
面向对象 类
摘要:什么是程序:程序就是为了模拟现实世界,解决现实问题而使用计算机语言编写的指令集合 什么是对象:面向对象思想 一切客观的事物就是对象,万物皆对象 任何对象,一定具有自己的特征和行为:特征:称为属性,一般为名词,代表对象有什么。行为:称为方法,一般为动词,代表对象能做什么 分析一个对象都有什么(属性) 阅读全文
posted @ 2022-05-14 23:43 Tsunami黄嵩粟 阅读(51) 评论(0) 推荐(0) 编辑
ztree.js 禁止点击事件和鼠标禁用
摘要:先看样式 var _t = this; var setting = { view: { fontCss: { color: "#5E5F61" }, showIcon: true, showLine: false }, data: { simpleData: { enable: true } }, 阅读全文
posted @ 2022-05-06 17:19 Tsunami黄嵩粟 阅读(623) 评论(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黄嵩粟 阅读(29) 评论(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黄嵩粟 阅读(18) 评论(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黄嵩粟 阅读(11) 评论(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黄嵩粟 阅读(17) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示

喜欢请打赏

扫描二维码打赏

支付宝打赏