码迷,mamicode.com
首页 >  
搜索关键字:void    ( 62627个结果
for语句增强
package ShunXuDome;public class forDOme05 { public static void main(String[] args) { int[]numbers={10,20,30,40,50};//定义了一个数组 for (int i = 0; i < 5; i+ ...
分类:其他好文   时间:2021-04-15 12:23:41    阅读次数:0
51nod 1254 最大子段和 V2(递推)
http://www.51nod.com/Challenge/Problem.html#problemId=1254 最终答案只有2种情况 1、不交换最大,相当于随便交换2个在最大子段和里的数。 2、把一个原本不在最大子段和里的数换到最大子段和里。 第1种情况就跑一遍求最大子段和就好 对于第2种情况 ...
分类:其他好文   时间:2021-04-15 12:23:14    阅读次数:0
EFCore3.1+编写自定义的EF.Functions扩展方法
前言 本文主要是讲解EF Core3.0+ 如何实现自定义的数据库扩展函数 虽然EF.Functions 提供了很多数据库函数,但是并不全面.比如加密解密.. 这样的话 我们就需要自己扩展这些数据库函数 从而达到调用的目的. 本文以达梦数据库为例(其他数据库都一样).. 上篇文章推荐: EF Cor ...
分类:其他好文   时间:2021-04-15 11:58:32    阅读次数:0
事件监听
事件监听 当某个事件发生,会产生什么? public class Demo01 { public static void main(String[] args) { //按下按钮,触发事件 Frame frame = new Frame(); Button button = new Button() ...
分类:其他好文   时间:2021-04-14 12:40:04    阅读次数:0
java基础[04]
增强for循环 public class ForDemo{ public static void main(String[] args){ int[] numbers = {10,20,30,40,50}; //遍历数组元素 for(int x:numbers){ System.out.printl ...
分类:编程语言   时间:2021-04-14 12:36:49    阅读次数:0
单向链表为什么要用一个辅助变量遍历
对于链表添加操作,假如不考虑按序号添加,则可以写一个简单的方法: public void add(HeroNode heroNode) { //因为head节点不能动,因此我们需要一个辅助变量遍历 HeroNode temp = head; //遍历链表,找到最后 while (true) { // ...
分类:其他好文   时间:2021-04-14 12:35:54    阅读次数:0
流程控制学习--打印三角形及Debug
package com.kuang.struct; public class TestDemo { public static void main(String[] args) { //打印三角形 5行 for (int i = 1; i <= 5; i++) { for (int j = 5; j ...
分类:其他好文   时间:2021-04-14 12:09:53    阅读次数:0
Java-方法
// 1.Java方法 public static void main (String args[]){ int res = sum(1, 2); // int res = HelloWorld.sum(1, 2); System.out.println(res); } // 求和 public s ...
分类:编程语言   时间:2021-04-14 12:05:41    阅读次数:0
6.synchronized的使用注意点
先来个单例模式的线程安全代码 package basic.single; public class SingleTon { private SingleTon(){ System.out.println(Thread.currentThread().getName()); } private sta ...
分类:其他好文   时间:2021-04-14 11:58:53    阅读次数:0
算数运算符 自增 自减
package com.zhang.www.base.operater; public class Demo06 { public static void main(String[] args) { //++ -- 自增 自减 一元运算符:一个数字就可以运算 int a=3; int b=a++; ...
分类:其他好文   时间:2021-04-13 12:33:54    阅读次数:0
62627条   上一页 1 ... 47 48 49 50 51 ... 6263 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!