Posts

Showing posts with the label String Comparison

Advanced Java Programming

Image
                          Advanced Java Programming Advanced Java Programming :-   Introduction to advance java   As most of us already know that if we want to make normal applications it  can be easily built using core Java concepts. But, when it we need to develop web applications, advanced Java fundamentals, like JSP, Servlets, JDBC etc. needed, so to add capabilities and features of the application advance java is essential for developers. Through the motive of this blog is to explain about Advanced Java, I will be giving you a complete insight into the fundamental concepts of Advance Java. Figure - 1.2 If you want to see complete video on this please  have a look the video below.                              Learn with Resh u Advanced Java Programming Course ...

String Comparison, Concatenation and Substring

Image
  String Comparison, Concatenation and Substring There's a lot to say about Strings, from the ways you can initialize them to the String Literal Pool, however in this article we'll focus on common operations, rather than the class itself. Introduction Simply put, a String is used to store text, i.e. a sequence of characters. Java's most used class is the String class, without a doubt, and with such high usage, it's mandatory for Java developers to be thoroughly acquainted with the class and its common operations. Java String comparison We can compare string in java on the basis of content and reference. It is used in authentication (by equals() method),  sorting (by compareTo() method),  reference matching (by == operator) etc There are three ways to compare string in java: By equals() method By = = operator By compareTo() method 1.Java String equals() The java string equals() method compares the two given strings based on the content of the string. If any character is ...