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

In what ways is C# similar to Java?
Both are OOPs based, and can be used for software development as well as web application server scripting language.
Aparna
0 0
5
Should we learn DBMS and RDBMS without any Java training?
java or i can say any programming language is not required to learn DBMS or RDBMS
Karthik
0 0
6
in java every thing is in the form of object
Everything is object is java except primitive data types like int,long etc..thats the reason its not 100 % object oriented language..
Abrar
Sir tell me some tips to code in java?
If you know C / C++ already, just try how will you able to achieve same examples in java. I prefer try to understand the fundamental of java and create small programs, then make the connectivity among them. Slowly build an application.
Nitinkumar

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

Ask a Question

Related Lessons


Most Important Java Interview Topics
Dear All, I am here to help on java interview preparation for fresher and experienced people, please get in touch with me for further details. All interview preparation will be with unique teaching style...

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.,...

Necessity of Theory and Practical in Computer Science.
Upon studying a subject both theory and practical are important. Usually many schools concentrate more on theory and the marks not on the practical. Other and opposite kind of people prefer practical...

Why we need to learn Programming languages?
Language is medium for communication. If two parties like to communicate or exchange the thoughts they must know a language. Language should be understandable by both the Parties. For example A wants to...

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