GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update Java内存区域.md · zuozewei/JavaGuide@dcea444

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • docs/java/jvm
    • Java内存区域.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎docs/java/jvm/Java内存区域.md‎

Copy file name to clipboardExpand all lines: docs/java/jvm/Java内存区域.md
+4-1Lines changed: 4 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,10 @@ System.out.println(s3==s4); // False
494494
495495
### 4.2 String s1 = new String("abc");这句话创建了几个字符串对象?
496496
497-
将创建 1 或 2 个字符串。如果池中已存在字符串常量“abc”,则只会在堆空间创建一个字符串常量“abc”。如果池中没有字符串常量“abc”,那么它将首先在池中创建,然后在堆空间中创建,因此将创建总共 2 个字符串对象。
497+
会创建 1 或 2 个字符串:
498+
499+
- 如果字符串常量池中已存在字符串常量“abc”,则只会在堆空间创建一个字符串常量“abc”。
500+
- 如果字符串常量池中没有字符串常量“abc”,那么它将首先在字符串常量池中创建,然后在堆空间中创建,因此将创建总共 2 个字符串对象。
498501
499502
**验证:**
500503

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.