Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8567043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:47:36+00:00 2026-06-11T17:47:36+00:00

String a = Hello\u200e; String b = Hello\u200f; System.out.println(a = ‘ + a +

  • 0
String a = "Hello\u200e";
String b = "Hello\u200f";

System.out.println("a = '" + a + "' and b = '" + b + "' are length "
                     + a.length() + " and " + b.length()
                     + ", equals() is " + a.equals(b));

The code in the above code snippet produces the following output.

a = ‘Hello‎’ and b = ‘Hello‏’ are length 6 and 6, equals() is false

Although the value of both a and b displayed on the console is Hello‏, a.equals(b) returns false. How?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:47:38+00:00Added an answer on June 11, 2026 at 5:47 pm

    U+200E and U+200F are not printable characters. They’re both control characters which dictate how the text should be rendered – either left to right, or right to left.

    You won’t see these in the terminal, and they shouldn’t be equivalent strings.

    0x200E ^ 0x200F != 0

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following string hello[code:1], world [code:2], hello world I want to replace this
I have a following code which works fine MsgBox(AddSomething(Of String)(Hello, World)) Public Function AddSomething(Of
i have written the following code to copy a string hello world to another
Take the following Java string: Hello, World I want to take that string and
Say I have the following string: hello my car is red and my shoe
For instance, I have the following string: Hello how are you today, [name]? How
Consider the following snippet: public class ReflectionTest { public static void main(String[] args) {
The following simple Java program appears to display the string Hello World through the
Suppose you have the following string: Hello... how are you!!?? I'm bored!! I want
Say I have the following string: Hello how are you. Since MS Word allows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.