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. FireFox中iframe的返回上页问题

    -----已测试,可以使用----- 原文地址链接:http://fansofjava.iteye.com/blog/1019852 在写静态页面过程中遇到了FF的history.back()和his ...

  2. JS_call_APP native 与 html的交互

    1.***** 特点:下个版本的交互准备使用这个(http://www.knowsky.com/884428.html) https://github.com/lifei321/JS-OC http: ...

  3. asp获取虚拟目录根路径

    <% TempArray = Array("account_book","admin","ajaxFile","catalo ...

  4. centos7 安装mysql5.7.16

    1 下载地址http://dev.mysql.com/downloads/mysql/#downloads 2. 解压 -linux-glibc2.-x86_64.tar.gz 3.移动解压出来的文件 ...

  5. Postman 安装及使用入门教程

    安装 本文只是基于 Chrome 浏览器的扩展插件来进行的安装,并非单独应用程序. 首先,你要台电脑,其次,安装有 Chrome 浏览器,那你接着往下看吧. 1. 官网安装(别看) 打开官网,http ...

  6. 20160817_Redis配置操作

    ZC: 主要是 做一些配置,使得 java程序能够访问到 redis服务器,主要内容为:ZC: ①.redis服务端服务 重启的命令ZC: ②.取消绑定 本地IP的配置,使得 所有本网段局域网机器都能 ...

  7. Openvpn 本地密码验证

    1.修改配置文件.(添加下列配置) auth-user-pass-verify /etc/openvpn/checkpsw.sh via-env #开启用户密码脚本 client-cert-not-r ...

  8. Java与mysql数据库编程中遇见“Before start of result set at com.mysql.jdbc.SQLError.createSQLException” 的解决办法

    这个Bug是因为在取出ResultSet对象,对其进行操作时,没有采用.next()方法将ResultSet对象的光标移至指定行,不管Statement对象执行SQL语句是否十分确定能搜出记录,也不可 ...

  9. 0020 Linux 文件操作命令

    1. 创建文件 touch 文件名 2. 删除文件 rm 文件名 3. 复制文件 cp 源文件 目录 4.剪切文件 mv 源文件 目标文件 5.重命名文件 mv 源文件名 新文件名 6.改变文件权限 ...

  10. Yii 添加Input时间插件

    1.首先引入时间组件的JS文件,组件可以在网上下载到没有的可以到网上去下载 <script language="javascript" type="text/jav ...