Java
/乾坤未定/
念念不忘,必有回响。
展开
-
Spring Cloud Dependencies配置maven仓
地址:https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies 配置maven:原创 2020-11-02 10:15:47 · 837 阅读 · 0 评论 -
分别用Python,Java,Golang,PHP实现Hello World,哪个更适合你
Python语言(只要一行,不带分号): print("Hello World") Java语言(需要五行,要带分号): public class test{ public static void main(String[] args) { System.out.println("Hello World"); } } Golang语言(五行,不带分号): package main ...原创 2020-11-02 10:14:09 · 205 阅读 · 0 评论 -
记录宝塔面板后台提示“拒绝了我们的连接请求”
起因:因为擅自将ubuntu中python2升级为python3.5出现的问题 先看一下后台面板状态:Bt-Panel not running,也就是说后台根本没有启动呀,所以肯定进不去 重启一下试试:提示ModuleNotFoundError: No module named ‘geventwebsocket’ 那就安装对应的模块:结果出错,因为我的安装命令用错了,,,,,尴尬 真正的安装命令:pip install gevent-websocket 安装成功,完美重启: 终于回到后台: ...原创 2020-11-02 10:11:45 · 2034 阅读 · 0 评论 -
JAVA中Cookie MaxAge属性及其使用
API文档中对MaxAge的描述: public void setMaxAge(int expiry) Sets the maximum age of the cookie in seconds. A positive valueindicates that the cookie will expire after that many seconds have passed. Note that the value is the maximum age when the cookie will ex.原创 2020-11-02 10:10:09 · 1938 阅读 · 1 评论 -
Java开发斗地主发牌案例
主要用到了集合和数组,还用到了将集合中的元素随机打乱的方法: package DouDiZhu; import java.util.ArrayList; import java.util.Collections; import java.util.stream.Collectors; public class DiZhhu { public static void main(String[] args) { System.out.println("斗地主案例"); ...原创 2020-11-02 10:09:05 · 309 阅读 · 0 评论 -
java中数据类型的关系,以及byte、short、int、long、float、double取值
基本类型1、整数:包含int,short,byte,long 2、浮点型:float,double 3、字符:char 4、布尔:boolean 分析基本数据类型的特点,最大值和最小值。 1、 基本类型:byte 二进制位数:8 包装类:java.lang.Byte 最小值:Byte.MIN_VALUE=-128(-2的7次方) 最大值:Byte.MAX_VALUE=127(2的7次方-1) 2、 基本类型:short 二进制位数:16 包装类:java.lang.Short 最小值:Short.MI原创 2020-11-02 10:04:49 · 510 阅读 · 2 评论