随笔分类 -  Java

摘要: 阅读全文
posted @ 2022-04-25 13:25 ascertain 阅读(22) 评论(0) 推荐(0) 编辑
摘要:byte[] => hexString package io.oar; import java.util.Formatter; public class TestByteToHex{ public static void main(String[] args){ byte[] bytes = {-5 阅读全文
posted @ 2022-04-21 19:18 ascertain 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-04-16 23:23 ascertain 阅读(30) 评论(0) 推荐(0) 编辑
摘要:开启管理访问: conf/tomcat-users.xml : <role rolename="admin-gui" /> <role rolename="admin-script" /> <role rolename="manager-gui" /> <role rolename="manager 阅读全文
posted @ 2022-04-13 22:30 ascertain 阅读(43) 评论(0) 推荐(0) 编辑
摘要:public class B { public static final void main(String[] args) { System.out.println(System.getProperty("bb")); System.out.println(System.getProperty("f 阅读全文
posted @ 2022-04-13 18:17 ascertain 阅读(341) 评论(0) 推荐(0) 编辑
摘要:@Test public void d() throws IOException{ URL url = new URL("http://baidu.com"); InputStream inputStream; URLConnection urlConnection = url.openConnec 阅读全文
posted @ 2022-04-12 16:42 ascertain 阅读(33) 评论(0) 推荐(0) 编辑
摘要:classpath: import java.io.File; import java.util.Arrays; public class B { public static final void main(String[] args) { String property = System.getP 阅读全文
posted @ 2022-04-12 14:57 ascertain 阅读(64) 评论(0) 推荐(0) 编辑
摘要:package com.company; public class Wig{ public static void main(String[] args){ Object[] objects = new String[]{"a", "b", "c"}; if(objects instanceof S 阅读全文
posted @ 2022-04-12 13:36 ascertain 阅读(600) 评论(0) 推荐(0) 编辑
摘要:public class Zak { static ThreadLocal<Integer> threadLocal = new ThreadLocal<>(); public static void main(String[] args) throws InterruptedException{ 阅读全文
posted @ 2022-04-11 20:02 ascertain 阅读(17) 评论(0) 推荐(0) 编辑
摘要:<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sc 阅读全文
posted @ 2022-04-07 13:48 ascertain 阅读(178) 评论(0) 推荐(0) 编辑
摘要:java -cp ".;./mysql-connector-java-8.0.28.jar" zak.Zak https://stackoverflow.com/questions/2839321/connect-java-to-a-mysql-database package zak; impor 阅读全文
posted @ 2022-04-04 22:00 ascertain 阅读(223) 评论(0) 推荐(0) 编辑
摘要:Server & Client Utils.java package den; import java.io.*; import java.nio.charset.StandardCharsets; public class Utils{ public static byte[] streamToB 阅读全文
posted @ 2022-04-03 14:21 ascertain 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-04-02 12:49 ascertain 阅读(48) 评论(0) 推荐(0) 编辑
摘要:Install: unzip -o apache-maven-3.8.4-bin.zip -d /usr/local cd /usr/local ln -svnf apache-maven-3.8.4 maven Maven – Download Apache Maven update-altern 阅读全文
posted @ 2021-08-13 14:06 ascertain 阅读(59) 评论(0) 推荐(0) 编辑
摘要:Maven pom.xml Gradle build.gradle build.gradel allprojects { repositories { maven { url 'file:///D:/program/repository'} mavenLocal() maven { name "Al 阅读全文
posted @ 2021-08-07 13:31 ascertain 阅读(93) 评论(0) 推荐(0) 编辑
摘要:package ersatz; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; public class Ersatz { public static vo 阅读全文
posted @ 2021-08-06 17:13 ascertain 阅读(33) 评论(0) 推荐(0) 编辑
摘要:package ersatz; import org.junit.jupiter.api.Test; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStre 阅读全文
posted @ 2021-08-05 15:30 ascertain 阅读(57) 评论(0) 推荐(0) 编辑
摘要:解决超卖 package ersatz.thread; public class T { public static void main(String[] args) { Ticket ticket = new Ticket(); new Thread(ticket).start(); new Th 阅读全文
posted @ 2021-08-02 13:41 ascertain 阅读(39) 评论(0) 推荐(0) 编辑
摘要:package ersatz.thread; public class T { public static void main(String[] args) throws InterruptedException { B b = new B(); b.start(); Thread.sleep(5 阅读全文
posted @ 2021-08-02 11:08 ascertain 阅读(68) 评论(0) 推荐(0) 编辑
摘要:package ersatz.thread; public class T1 { public static void main(String[] args) throws InterruptedException { C c = new C(); c.start(); for (int i = 0 阅读全文
posted @ 2021-08-01 15:03 ascertain 阅读(23) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示