简单的定义 const numArr:number[]=[1,2,3] const strArr:string[]=['a','b','c'] const undeArr:undefined[]=[undefined,undefined] 数组中有字符串又有数组的类型 const arr:(numb ...
分类:
编程语言 时间:
2021-04-27 14:24:27
阅读次数:
0
自增,自减&&逻辑运算符&&位运算符 1 package operator; 2 3 public class Demo4 { 4 public static void main(String[] args) { 5 //++ -- 自增 自减 一元运算符 6 int a=3; 7 8 int b= ...
分类:
编程语言 时间:
2021-04-27 14:20:46
阅读次数:
0
此博客链接: 题解: 找大写26个字母的位置,26个字母可以重复M个 输入为N M,N测试用例个数,M为字母重复个数, 输出字母和处于第几位 代码 public class leetcode { public static void main(String[] args) { Scanner sca ...
分类:
其他好文 时间:
2021-04-27 14:19:47
阅读次数:
0
关于GraphQL之前有描述,可以参考GraphQL 入门。但是这个入门写得不是很好,东拉西扯。为巩固所学我自己总结一下。 我们先定义一个类型系统: type Person { name: String! } type ClassRoom { tercher: Person! students: [ ...
分类:
其他好文 时间:
2021-04-26 14:10:12
阅读次数:
0
double a = 123456, b = 123456.1, c = 123456.12, d = 123456.123, e = 123456.126; Console.WriteLine(a.ToString("N")); //123,456.00 Console.WriteLine(b.T ...
完全数 : 其所有因子的的和等于该数(包括1,但是不包括该数字本身) package judgment;/** * 求1~1000的所有完全数 */public class Judgment { public static void main(String[] args) { for (int i ...
分类:
其他好文 时间:
2021-04-26 13:45:19
阅读次数:
0
写一个java文件 public static void main(String[] args) { String str1="abc"; String str2 ="abc"; String str3=new String("abc"); boolean b1= str1==str2; boole ...
分类:
其他好文 时间:
2021-04-26 13:44:32
阅读次数:
0
import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Problem53 { public static void main(String[] args) { ...
分类:
编程语言 时间:
2021-04-26 13:44:00
阅读次数:
0
桥接模式 桥接模式结构图: 示例代码: // 桥接角色Message接口 public interface Message { void sendMessage(String message, String toUser); } // 具体Message角色Email public class Em ...
分类:
其他好文 时间:
2021-04-26 13:31:33
阅读次数:
0
package com.bjpowernode.java.io; import java.io.*; /* 拷贝目录 */ public class CopyAll { public static void main(String[] args) { // 拷贝源 File srcFile = ne ...
分类:
其他好文 时间:
2021-04-26 13:27:13
阅读次数:
0