UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How to compare to strings in Java language?

Asked by Last Modified  

7 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Trainer

Using equals method
Comments

10 years of teaching experience in Engineering collges

equals(), compare(), ...
Comments

I am a IT professional

if you want to compare two strings by using (s1).equalsTo (s2). or by using compareTo
Comments

you can compare String using equals or equalsIgnoreCase methods of string class
Comments

Test Automation Expert with 23 years of Testing Experience - QTP, Selenium, Load runner

String class has method compare to do this. String Source_string = new String("Nagendra"); String Destination_string = new String("Nagendra"); String Temp_String = new String("Prasad"); // Following statement Returns true Source_String.equals(Destination_string); // Following statement Returns...
read more
String class has method compare to do this. String Source_string = new String("Nagendra"); String Destination_string = new String("Nagendra"); String Temp_String = new String("Prasad"); // Following statement Returns true Source_String.equals(Destination_string); // Following statement Returns false Source_String.equals(Temp_string); read less
Comments

Master of Science in Information Technology. Also I Have Post Graduate Diploma of Computer Applications, Certificate Course In Advanced Java, Certificate Course In MS-Office, DTP.

there are two String class functions available in Java- equals(String x) and equalsIgnoreCase(String x). EG- String s1="hello"; String s2="Hello"; System.out.println(s1.equals(s2)); System.out.println(s1.equalsIgnoreCase(s2)); first method compares two strings only with the exact sequence of characters...
read more
there are two String class functions available in Java- equals(String x) and equalsIgnoreCase(String x). EG- String s1="hello"; String s2="Hello"; System.out.println(s1.equals(s2)); System.out.println(s1.equalsIgnoreCase(s2)); first method compares two strings only with the exact sequence of characters in both strings but second method seeks for sequence and also the case of characters. read less
Comments

== and equals method ..
Comments

View 5 more Answers

Related Questions

How does Java implement polymorphism?
Java implements polymorphism in two ways: 1. Static or compile-time polymorphism is done by method overloading (more then one methods sharing the same name but different number/types/order of parameters) 2....
Sajjan
0 0
6
I know HTML, CSS, and a bit of JavaScript. What should I learn next?
HTML,CSS and Javascript are Tools which are used for Front-End Web Development. The next step is to learn the following: 1)Learn Javascript Frameworks like node.js,react.js,angular.js etc. 2)Learn Back-End...
Inch By
What are the advance features in java 1.8 when compare to java 1.6?
Many are there. 1. Lambda expression (functional Programming). 2. Default methods in interfaces.
Naresh N
What is the use of deployment descriptor?
A deployment descriptor describes how a component, module or application should be deployed. A web application’s deployment descriptor describes the classes, resources and configuration of the application...
Monisha

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Java: A Quick Overview
Not purely Object Oriented: It doesn't support multiple inheritence, it supports primitive data types and static members. Doesn’t support multiple inheritance: Reason is diamond problem i.e.,...

TestNG Annotations and its sequence
public class TestNGAnnotations { @BeforeMethod public void beforeM() { System.out.println("Before Method"); } @AfterMethod public void afterMethod() { System.out.println("After Method"); } @BeforeClass...
S

Sarthak C.

0 0
0

Hibernate 5
The Hibernate team published the first Hibernate 5 release quite a while ago, and since then they introduced a bunch of new features. I explained several of them here on the blog, and it’s about...
M

Mohammed Shahnawaz Akhter

2 0
0

What Is Java? Explain The History Of Java
i. Ovierview: Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java...

Java Collection
Collection: The collection provides an architecture like a list where we can store and manipulate the group of items. Through Collections, we can achieve operations such as searching, sorting, insertion,...

Vinaykumar D.

0 0
0

Recommended Articles

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more