kangjianwei / learningjdk Goto Github PK
View Code? Open in Web Editor NEWJDK源码阅读笔记
JDK源码阅读笔记
咨询一下,如何用idea实现不关联jdk?
运行BreakIteratorTest01,部分报错信息
Information:java: at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
Information:java: at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl$$Lambda$129/0x00000008003bc040.call(Unknown Source)
Information:java: Errors occurred while compiling module 'OpenJDK-11'
Information:javac 11 was used to compile java sources
Error:java: OutOfMemoryError: insufficient memory
现在是2020年2月, 作者的项目更新时间都到2020年6月了, 是否在系统日期还是哪里有些问题呢?
✏️ 系统内置的MIME表 康建伟 2020/6/23 22:04
💡 【sun.net.www.MimeTable】 MIME表 康建伟 2020/6/23 22:01
💡 【sun.net.www.MimeLauncher】 对指定输入源中的数据执行预设的命令 康建伟 2020/6/22 23:18
💡 【sun.net.www.MimeEntry】 MIME实体 康建伟 2020/6/21 22:30
💡 【sun.net.www.MessageHeader】 消息头,是一个键值对容器,通常可用来存储MIME信息头、请求头、响应头等 康建伟 2020/6/20 21:42
你好,最近在学习jdk源码,遇到了一点问题。
比如说我写了一个测试类:
public static void main(String[] args) {
String string = new String();
System.out.println(string.length());
}
然后修改jdk的string源代码:
public String() {
System.out.println("abc");
this.value = "a".value;
}
这时候我发现,abc
并不会打印。
你的项目能否实现对jdk代码的自行修改并输出呢?
感谢🙏
项目中Byte类中的两个方法解读如下:
// 比较两个byte(按自然顺序比较)
public static int compare(byte x, byte y) {
return x - y;
}
// 比较两个Byte(按自然顺序比较)
public int compareTo(Byte anotherByte) {
return compare(this.value, anotherByte.value);
}
更正:
源码中,compare(x,y)返回的是 x - y ,而并非是按顺序比较。
测试代码:
Byte a =1 ;
Byte b = -128;
System.out.println("compare结果" + Byte.compare(a,b)); // 1 - (-128) = 129
System.out.println("compareTo结果" + a.compareTo(b));// 1 - (-128) = 129
嗨,jdk 16 中怎么卸载自己加载的DLL
*/
// X.class.isLocalClass() ==> 判断X是否为方法内部类
public boolean isLocalClass() {
return isLocalOrAnonymousClass() && (isArray() || getSimpleBinaryName0() != null);
}
应该为‘本地类’
Originally posted by @wsuo in #4 (comment)
支持下,分析源码对成长很有帮助,如果能列出来目前已经分析完的源码清单就好了。
是否可以添加忽略文件,改造成maven项目
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.