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

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
What are the advantages of learning Java?
Dear Niteen Java is one of the most widest implemented technology for programming. Not only its used to develop full fledged Software Applications, but its also used for programming devices like Set...
Niteen
0 0
6
Is JAVA training only for technical students or a non-technical student also may join?
Any Body can Learn Programming Language.It All depends upon the learning of basics and all.Basics actually makes the thing different.
Vikrant
0 0
6
Between Java and Python, which one is better to learn first and why?
Both the development programs come with their strong suits. While Java allows you to enjoy the cross-platform support, Python helps you execute on at least ten different operating systems. It would help...
Priyanka
0 0
5

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

Ask a Question

Related Lessons

Difference Between Checked And Un-Checked Exception
1. Exception is an abnormal condition in the program, if raises program terminates abnormally. 2. Exception always occurs at runtime only, there is no chance of exception at compile time. 3. Syntactical...

JAVA Online Training
What is Java? Java is a technology developed by James Gosling at Sun Microsystems, Sun Microsystems is now a part of Oracle Corporation. This is one of the most powerful & securable language used to...

doWhile example in Java
public class doWhilePracticleEx { public void test() { } public static void main(String args) { String q1 = "Who is PM of India?"; String a1 = "Sonia Gandhi"; String a2 = "Rahul Gandhi"; String a3...
S

Sarthak C.

0 0
0

Puzzle Game coding
import java.awt.BorderLayout;import java.awt.Color;import java.awt.Dimension;import java.awt.Font;import java.awt.FontMetrics;import java.awt.Graphics;import java.awt.Graphics2D;import java.awt.RenderingHints;import...

JAVA OOPs Concepts (Object-Oriented Programming System)
JAVA OOPs Concepts (Object-Oriented Programming System) It is primarily having below crucial points. Without below essential points, we will never be able to achieve OOPs in java, PHP, C#, etc. Now let...

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