public class Main { public static void main(String[] args) { test test = new test(); test.xxx(new zi()); } } class fu{ public void x(){ System.out.pri ...
分类:
其他好文 时间:
2021-04-20 14:06:09
阅读次数:
0
public class StatePattern { public static void main(String[] args) { Context context=new Context(); for (int i = 0; i < 10; i++) { context.handle(); } ...
分类:
其他好文 时间:
2021-04-19 16:06:54
阅读次数:
0
解决属性名和字段名不一致的问题 1.出现的问题 数据库中的字段 ? 新建一个项目,拷贝之前的,测试实体类与数据库字段不一致的情况 public class User { private int id; private String name; private String password; } 现 ...
分类:
其他好文 时间:
2021-04-19 16:03:47
阅读次数:
0
1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<algorithm> 5 using namespace std; 6 7 void test01() 8 { 9 vector<int> v; 10 for( ...
分类:
编程语言 时间:
2021-04-19 15:55:39
阅读次数:
0
string 容器 常见用法 string s1 = "Hello" string s2("Hello") string s3(s2) string s4 = s3 getline(cin,s)// 从cin中读取一行给s s.empty()// 空?true:false; s.size()//返回 ...
分类:
其他好文 时间:
2021-04-19 15:53:19
阅读次数:
0
方法如下: public string Base64StringToFile(string base64String, string fileName) { //文件后缀 string suffix = ""; try { //文件保存路径 string fileFullPath = @"C:\Us ...
官方定义 接口隔离原则(Interface Segregation Principle),又称ISP原则 1、 客户端不应该依赖它不需要的接口 2、 类间的依赖关系应该建立在最小的接口上 基本介绍 通俗的来讲,不要在一个接口中定义多个方法,接口应该尽量细化 package jiekogeli; pu ...
分类:
其他好文 时间:
2021-04-19 14:48:17
阅读次数:
0
##思路 最长上升子序列的变形+记录路径 ##AC代码 #include<iostream> #include<cmath> #include<string.h> #include<algorithm> #include<stdio.h> #include<iomanip> #define inf ...
分类:
其他好文 时间:
2021-04-19 14:43:51
阅读次数:
0
C#中对xml数据的读取和写入: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; using System.Xml; using ...
public class MyInfo { public string Name { get; set; } public double Diff { get; set; } public string File { get; set; } } static void Main(string[] a ...