package com;

public class StringEquals {

public static void main(String[] args) {

String s1=new String("Hello");

String s2=new String("Hello");

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

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

String s3="Hello";

String s4="Hello";

System.out.println(s3==s4);

System.out.println(s3.equals(s4));

}

}

Equal的更多相关文章

  1. [LeetCode] Minimum Moves to Equal Array Elements II 最少移动次数使数组元素相等之二

    Given a non-empty integer array, find the minimum number of moves required to make all array element ...

  2. [LeetCode] Minimum Moves to Equal Array Elements 最少移动次数使数组元素相等

    Given a non-empty integer array of size n, find the minimum number of moves required to make all arr ...

  3. [LeetCode] Partition Equal Subset Sum 相同子集和分割

    Given a non-empty array containing only positive integers, find if the array can be partitioned into ...

  4. Equal Sides Of An Array

    参考:http://stackoverflow.com/questions/34584416/nested-loops-with-arrays You are going to be given an ...

  5. Int,Long比较重使用equal替换==

    首先,==有很多限制,如Integer 类型的值在[-128,127] 期间,Integer 用 “==”是可以的(参考),超过范围则不行,那么使用equal则代替则完全ok public stati ...

  6. 无法解决 equal to 操作中 "SQL_Latin1_General_CP1_CI_AS" 和 "Chinese_PRC_CI_AS"

    无法解决 equal to 操作中 "SQL_Latin1_General_CP1_CI_AS" 和 "Chinese_PRC_CI_AS" 之间 2011-0 ...

  7. LeetCode Minimum Moves to Equal Array Elements II

    原题链接在这里:https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii/ 题目: Given a non-empt ...

  8. LeetCode Minimum Moves to Equal Array Elements

    原题链接在这里:https://leetcode.com/problems/minimum-moves-to-equal-array-elements/ 题目: Given a non-empty i ...

  9. conflict between "Chinese_PRC_CI_AI" and "Chinese_PRC_CI_AS" in the equal to operation

    在SQL SERVICE做关联查询的时候遇到了"conflict between "Chinese_PRC_CI_AI" and "Chinese_PRC_CI ...

  10. why happen "WaitHandles must be less than or equal to 64"

    一.背景: 在一个项目中碰到大数据插入的问题,一次性插入20万条数据(SQL Server),并用200个线程去执行,计算需要花费多少时间,因此需要等200个线程处理完成后,记录花费的时间,需要考虑的 ...

随机推荐

  1. PDO数据库抽象层

    PDO的优势在于兼容性,但速度不如mysql和mysqli new PDO($dsn,$username,$passwd[,$options]) $options可以设置数据库连接属性,如: $opt ...

  2. C#编写最小化时隐藏为任务栏图标的 Window appllication.

    1.设置WinForm窗体属性showinTask=false 2.加notifyicon控件notifyIcon1,为控件notifyIcon1的属性Icon添加一个icon图标. 3.添加窗体最小 ...

  3. 阿里云对象存储OSS————跨域资源共享(CORS)(m3u8 无法加载m3u8:跨域访问被拒绝)

    今天在做视频直播录像的时候,添加一个录制APP的.M3U8文件到OSS的一个test文件中存储,结果是访问不到了: 提示:无法加载m3u8:跨域访问被拒绝!!!!! 项目代码测试地址:https:// ...

  4. centos7 禁止防火墙

    #CentOS .0默认使用的是firewall作为防火墙,这里改为iptables防火墙. #firewall: systemctl start firewalld.service#启动firewa ...

  5. 多版本Python管理及Python连接MySQL

    Python有个非常别扭的地方,就是两个不兼容的版本,很尴尬,有的包只能在低版本的2.7上才能运行,比如即将用到的MySQLdb. 所以首先必须在系统上安装两个版本的Python(貌似在pycharm ...

  6. 最精简的django程序

    一.程序框架 1.结构图

  7. vs---错误收集并自己解决后归纳

    1.C++编译时,出现这样的错误 d:\program files\microsoft visual studio\vc98\include\stdio.h(36) : error C2143: sy ...

  8. AngularJS: 'Template for directive must have exactly one root element' when using 'th' tag in directive template

    .controller('HomeController', function($scope,$location) { $scope.userName='天下大势,为我所控!'; $scope.clkU ...

  9. Citrix 虚拟化笔记

    利用win7 x64/Vmware workstation 10练习Citrix虚拟化 [安装Xenserver 6.2] 1)硬盘空间不足:要求最小8G 2)不支持硬件虚拟化:找到建立的XENSER ...

  10. code of C/C++ (1)

    去年,王老师拷贝给我一些代码,非常感激,老爷子的水平我这个小辈只能仰视,代码都是来自他所教的课程,有些课程因为这几年据说太难都给取消掉了,实在是 我们学校的损失. C/C++代码都是在讲述一些非常基本 ...