博文

目前显示的是 2024的博文

Java Base == & equals

  Tags:  Integer cache, == , equals This Blogger emphasizes that in actual development, developers should prioritize using .equals() to compare object values ​​rather than simply relying on == to compare references. Java's Integer cache mechanism provides memory optimization for Java programs with values ​​in the range of -128 to 127.However, values ​​outside this range will result in the creation of new objects, resulting in unexpected results in == comparisons.       public static void main(String[] args) {         Integer a = 228;         Integer b = 228;         System.out.println(a == b); // false         Integer x = 1;         Integer y = 1;         System.out.println(x == y); // true         Integer c = 228;         Integer d = 228;         System.out.println(System.identityHash...

Data URI是由RFC 2397 ACE

https://www.rfc-editor.org/rfc/rfc2397 http://codingpy.com/article/how-to-turn-your-browser-into-code-editor/ https://ace.c9.io/build/kitchen-sink.html https://c9.io/ https://angular-ui.github.io/ The "data" URL scheme Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. Copyright Notice Copyright (C) The Internet Society (1998). All Rights Reserved. 1 . Abstract A new URL scheme, "data", is defined. It allows inclusion of small data items as "immediate" data, as if it had been included externally. 2 . Description Some applications that use URLs also have a need to embed (small...