码迷,mamicode.com
首页 >  
搜索关键字:public    ( 82854个结果
jdb链接数据库,简单操作(ResultSet,浮标)(DriverManager 驱动管理器类 Connection 接口 Statement 接口)
链接数据库 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
Java-面向对象_Object类的toString方法
直接输出对象如图: 方法的原理: 代码: 子类:所有类的直接或间接的继承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
RegexHelper
using System; using System.Text.RegularExpressions; public partial class RegexEx { /// <summary> /// 验证输入字符串是否与模式字符串匹配,匹配返回true /// </summary> /// <pa ...
分类:其他好文   时间:2021-03-02 11:46:45    阅读次数:0
C#面试题总结
1. .NET和C#有什么区别 答:.NET一般指 .NET FrameWork框架,它是一种平台,一种技术。 C#是一种编程语言,可以基于.NET平台的应用。 2.一列数的规则如下: 1、1、2、3、5、8、13、21、34...... 求第30位数是多少,用递归算法实现。答: public cl ...
分类:Windows程序   时间:2021-03-02 11:43:49    阅读次数:0
类型转换错误使用
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
【剑指Offer-36】二叉搜索树与双向链表
问题 输入一棵二叉搜索树,将该二叉搜索树转换成一个排序的循环双向链表。要求不能创建任何新的节点,只能调整树中节点指针的指向。 示例 解答1:递归 class Solution { public: Node* treeToDoublyList(Node* root) { if (!root) retu ...
分类:其他好文   时间:2021-03-01 14:06:54    阅读次数:0
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!