惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Spread Privacy
Spread Privacy
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
SecWiki News
SecWiki News
腾讯CDC
P
Privacy International News Feed
Webroot Blog
Webroot Blog
J
Java Code Geeks
爱范儿
爱范儿
A
About on SuperTechFans
S
Secure Thoughts
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
DataBreaches.Net
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Security Latest
Security Latest
Forbes - Security
Forbes - Security
小众软件
小众软件
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threatpost
量子位
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Google Online Security Blog
Google Online Security Blog
云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
The Exploit Database - CXSecurity.com
Help Net Security
Help Net Security
V
Visual Studio Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 聂微东
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs

博客园 - 陈叙远

发现了lucene一个bug .netFramework1.1下创建文件几种方式的不同之处 介绍一下Hyper Estraier 关于密码管理,一个很好的思路 无ASPX文件部署(续) NO Stop的GUI 在c#中调用windows脚本的方法 - 陈叙远 - 博客园 .net中的魔字符串 - 陈叙远 - 博客园 有人对开发一个开发平台感兴趣吗? 用来整理桌面的jscript脚本 某知名软件公司的一道笔试题 令人困绕的timer 热烈庆祝第一次博客园&博客堂线下聚会圆满成功 hello customer & order----你是哪一级? 立即释放.net下的com组件 笔试题系列之四 笔试题系列之三 笔试题系列之二 中秋佳节,献上笔试题一道,祝各位事业蒸蒸日上!
java和c#语言上的一个不同之处 - 陈叙远 - 博客园
陈叙远 · 2004-10-12 · via 博客园 - 陈叙远

请看下面代码:
java:
String s1 = "abc";
String s2 = new String("abc");
String s3 = "a" + "bc";

System.out.println(s1.equals(s2));
System.out.println(s1.equals(s3));

System.out.println(s1 == s2);
System.out.println(s1 == s3);

c#:
String s1 = "abc";
String s2 = new String(new char[] {'a', 'b', 'c'});
String s3 = "a" + "bc";

Console.WriteLine(s1.Equals(s2));
Console.WriteLine(s1.Equals(s3));

Console.WriteLine(s1 == s2);
Console.WriteLine(s1 == s3);

运行结果是:
java:
true
true
false
true

c#:
true
true
true
true

解释:
java中,string.equals逐一比较字符,==比较引用
c#中,我就不多说了,这里是博客园,都对这个比较熟了:)