码迷,mamicode.com
首页 >  
搜索关键字:maybe not public    ( 83099个结果
简单的打印三角形
public static void main(String[] args) { //打印三角形 5行 for (int i = 1; i <= 5; i++) { for (int j=5;j>=i;j--){ System.out.print(" "); } for (int j = 1; j ...
分类:其他好文   时间:2021-01-02 10:29:54    阅读次数:0
java中==和equals()方法
java 程序中测试两个变量是否相等有两种方法: == equals()方法 当使用==判断两个变量是否相等时,如果两个变量是基本类型变量,且都是数值类型(不一定要求数据类型严格相同),则只要两个变量的值相等时,才会返回true public class m{ 10 public static vo ...
分类:编程语言   时间:2021-01-02 10:28:43    阅读次数:0
还是java牛逼,一行代码搞定各种排序
排序大家都经常用的吧,下面是个学生类,2 个字段:id[学号],score[分数], public class Stu { //编号 private Integer id; //分数 private Integer score; public Stu(Integer id, Integer scor ...
分类:编程语言   时间:2021-01-01 13:00:11    阅读次数:0
this关键字详解
this关键字代指当前对象,可在方法中区分全局变量和局部变量 public class ThisTest { private int age; public ThisTest(){ System.out.println("我是空参"); } public ThisTest(int age){ thi ...
分类:其他好文   时间:2021-01-01 12:56:30    阅读次数:0
LeetCode40. 组合总和 II
思路:回溯搜索 + 剪枝。 注意,回溯做选择的方法,不适用于有 “有重复元素的数组”。因此,重点掌握 常规回溯算法的写法。 class Solution { public List<List<Integer>> combinationSum2(int[] candidates, int target ...
分类:其他好文   时间:2021-01-01 12:54:26    阅读次数:0
增加字段规范表,并修改字段规范表导出Excel时自动增加SQL创建表语句
在ExcelUtil.java中修改函数fillExcelData,判断是否为字段规范表的导出。 public void fillExcelData(int index, Row row){ int startNo = index * sheetSize; int endNo = Math.min( ...
分类:数据库   时间:2021-01-01 12:52:29    阅读次数:0
迭代法 二叉树前序、中序、后序 遍历
前序 class Solution { public: vector<int> preorderTraversal(TreeNode* root) { vector<int> res; if (root == nullptr) { return res; } stack<TreeNode*> stk ...
分类:其他好文   时间:2021-01-01 12:36:16    阅读次数:0
C# 传不定参数
1 public class MyClass 2 { 3 public static void UseParams(params int[] list) 4 { 5 for (int i = 0; i < list.Length; i++) 6 { 7 Console.Write(list[i] + ...
分类:Windows程序   时间:2021-01-01 12:23:11    阅读次数:0
设计模式 - 12)抽象工厂
class User { int _id; public int Id { get { return _id; } set { _id = value; } } string _name; public string Name { get { return _name; } set { _name ...
分类:其他好文   时间:2021-01-01 12:10:52    阅读次数:0
1、java初体验
class HelloChina{ public static viod main(String[] args){ System.out.println("hello,world"); } } ...
分类:编程语言   时间:2021-01-01 12:02:08    阅读次数:0
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!