Scanner进阶使用 整数 package com.kuang.scanner; import java.util.Scanner; public class Demo04 { public static void main(String[] args) { Scanner scanner = n ...
分类:
其他好文 时间:
2021-03-02 12:18:14
阅读次数:
0
链接数据库 public static void main(String[] args) { //简约方式 try { Connection conn = DriverManager.getConnection("jdbc:mysql:/mysql?user=aa"); Statement st = ...
分类:
数据库 时间:
2021-03-02 12:02:39
阅读次数:
0
直接输出对象如图: 方法的原理: 代码: 子类:所有类的直接或间接的继承Object类,如果类中没有extends,其实它是默认extends Object类,不过是省略不写而已。 public class Student { String name; int age; public Student ...
分类:
编程语言 时间:
2021-03-02 12:02:25
阅读次数:
0
public class demo5 { public static void main(String[] args) { int a = 10; int b = 20; a+=b;//a = a+b a-=b;//a = a-b System.out.println(a); //字符串连接符 Sy ...
分类:
其他好文 时间:
2021-03-02 11:50:18
阅读次数:
0
ThreadPoolExecutor介绍 通过 ThreadPoolExecutor 创建线程池,API 如下所示: public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUn ...
分类:
编程语言 时间:
2021-03-02 11:49:07
阅读次数:
0
using System; using System.Text.RegularExpressions; public partial class RegexEx { /// <summary> /// 验证输入字符串是否与模式字符串匹配,匹配返回true /// </summary> /// <pa ...
分类:
其他好文 时间:
2021-03-02 11:46:45
阅读次数:
0
1. .NET和C#有什么区别 答:.NET一般指 .NET FrameWork框架,它是一种平台,一种技术。 C#是一种编程语言,可以基于.NET平台的应用。 2.一列数的规则如下: 1、1、2、3、5、8、13、21、34...... 求第30位数是多少,用递归算法实现。答: public cl ...
public static void main(String[] args) { int num1 = 10_0000_0000; int rate = 20; long total = num1 * rate; System.out.println(total);// 输出为-1474836480 ...
分类:
其他好文 时间:
2021-03-01 14:18:24
阅读次数:
0
public class demo4 { //逻辑运算符 public static void main(String[] args) { //与(&&)或(||)非(!) boolean a = true; boolean b = false; System.out.println(a && b) ...
分类:
其他好文 时间:
2021-03-01 14:15:22
阅读次数:
0
1)注册分页插件(@Configuration) @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); } 2) 使用 @Test void testPage( ...
分类:
其他好文 时间:
2021-03-01 14:15:10
阅读次数:
0