学习完《Java泛型详解》一节中我们了解到,从Java 1.5 版本开始,Java 的 Class 类增加了泛型功能,从而允许使用泛型来限制 Class 类。例如,String.class 的类型实际上是 Class<String>。如果 Class 对应的类暂时未知,则使用 Class<?>。通过 ...
分类:
编程语言 时间:
2021-03-16 14:10:18
阅读次数:
0
类型转换 public class 类的转换 { public static void main(String[] args) {? /*类型转换 低 高 byte,short,char-int-long-float-double 高到低强制转换,低到高自动转换 */? //强制转换? int a ...
分类:
其他好文 时间:
2021-03-16 14:07:25
阅读次数:
0
Java基础语法 标识 单行标注 // 多行标注 /* */ 多做标注 关键字 public class Demo02 { public static void main(String[] args) { String ab="c"; System.out.print(ab); } } 注意语法中符 ...
分类:
编程语言 时间:
2021-03-16 11:57:10
阅读次数:
0
线程创建三个方法: 1.继承thread类 2.实现runnable接口 3.实现callable接口 实例: //线程的创建方法public class TestNew { public static void main(String[] args) { new Mythread1().start ...
分类:
编程语言 时间:
2021-03-16 11:55:44
阅读次数:
0
public class SimpleExpressDemo02 { public static void main(String[] args) { int a=10,b=6; System.out.println("改变之前的数是:a=" + a + ",b=" + b); a-=b++; // ...
分类:
其他好文 时间:
2021-03-16 11:51:45
阅读次数:
0
防止输入有误 private void txtC_KeyPress(object sender, KeyPressEventArgs e) { txtKeyPress(sender, e); } private void txtKeyPress(object sender, KeyPressEven ...
Mybatis插件 Mybatis-PageHelper gitee中使用方法介绍 https://gitee.com/caomj_github/Mybatis-PageHelper/blob/master/wikis/zh/HowToUse.md 在 pom.xml 中添加如下依赖: <depen ...
分类:
其他好文 时间:
2021-03-15 11:14:14
阅读次数:
0
数组的使用 For-Each 循环 普通的for循环 数组作方法入参 数组做返回值 package com.liuqi.array; public class ArrayDemo04 { public static void main(String[] args) { int[] arrays = ...
分类:
编程语言 时间:
2021-03-15 11:04:39
阅读次数:
0
##1.基本数据类型的包装类 Java提倡的万物皆对象,但是数据类型的划分出现了基本数据类型和引用数据类型,那么我们怎么能把基本数据类型称为对象呢? 除了Integer和Character定义的名称和对应的基本类型差异大,其他六种都是将首字母大写就可以了。 Integer,Byte,Float,Do ...
分类:
编程语言 时间:
2021-03-15 10:38:35
阅读次数:
0
1 引入 Python 3.x 和 Python 2.x 的一个区别是 Python 3 可以使用直接使用 super().xxx 代替 super(Class, self).xxx super() 函数是用于调用父类(超类)的一个方法。 super() 是用来解决多重继承问题的,直接用类名调用父类 ...
分类:
其他好文 时间:
2021-03-15 10:36:46
阅读次数:
0