循环结构 while 循环 while是最基本得循环,它的结构为: while(布尔表达式){ //循环内容 } 只要布尔表达式为true,循环就会一直执行下去 public class WhileDemo01 { public static void main(String[] args) { / ...
分类:
编程语言 时间:
2021-04-06 14:10:11
阅读次数:
0
/** * 在Jdk8中关于接口的新特性,可以为接口添加静态方法和默认方法 */ public class interfaceTest2 { public static void main(String[] args) { Subclass s = new Subclass(); //知识点1:接口 ...
分类:
编程语言 时间:
2021-04-05 12:29:02
阅读次数:
0
这个问题主要是因为定义类的时候在类名后边加了个括号(); `public class Hello { public static void main(String[] args) { System.out.print("Hello World!"); System.out.println();//换 ...
分类:
其他好文 时间:
2021-04-05 12:26:42
阅读次数:
0
文档目录: 一、概念 二、解决方案 三、举例说明 分割线:正文 一、概念 关注数据在多线程并发时安全问题,共享数据有修改的行为。 二、解决方案 1、线程排队执行,不能并发,即线程同步机制。 2、使用synchronized(){}线程同步代码块,()内填写需要同步的共享对象 3、局部变量永远不存在线 ...
分类:
编程语言 时间:
2021-04-05 12:16:31
阅读次数:
0
遇到的问题: 1.只有第一个动画播放了,后面的不播放动画 原因 : 还没完全加载到轮播,动画就已经播放完了 解决方案 : 加一秒动画延迟 引入文件 <-- css --><link rel="stylesheet" type="text/css" href="/static/readme/anima ...
分类:
其他好文 时间:
2021-04-05 12:02:59
阅读次数:
0
摘自:https://blog.csdn.net/weibo1230123/article/details/81410241 前言:1.linux线程执行和windows不同,pthread有两种状态joinable状态和unjoinable状态,如果线程是joinable状态,当线程函数自己返回退 ...
分类:
系统相关 时间:
2021-04-05 11:58:12
阅读次数:
0
Fib(n)=Fib(n-1)+Fib(n-2);Fib1=Fib2=1; ##递归 public static int fibonacci(int n){ if (n == 1 || n == 2) { return 1; } if (n > 2) { return fibonacci(n - 1 ...
分类:
编程语言 时间:
2021-04-02 13:35:33
阅读次数:
0
一、文本与Base64 1、文本转Base64字符串 private static string StrToBase64(string str) { byte[] b = Encoding.Default.GetBytes(str); //转成 Base64 形式的 System.String st ...
public class DistanceRad { private static double EARTH_RADIUS = 6378.137;// 单位千米 /** * 角度弧度计算公式 rad:(). <br/> * <p> * 360度=2π π=Math.PI * <p> * x度 = x ...
分类:
编程语言 时间:
2021-04-02 13:00:40
阅读次数:
0
/* * 接口的使用 * 1.接口使用上也满足多态性 * 2.接口,实际上就是定义了一种规范 * 3.开发中,体会面向接口编程! */ public class USBTest { public static void main(String[] args) { Computer com = new ...
分类:
其他好文 时间:
2021-04-01 13:43:59
阅读次数:
0