Java

Java is a simple, secured, high level, platform-independent, multithread, Object-oriented programming language.

 

It’s one of the most popular and widely used programming language, platform, and technology. Java is not only a language it is also a platform and technology.

 

Related Pages:-

Java String charAt() Method

Java String charAt() Method | In this section, we will discuss the charAt() method available in the Java String class which is used to return the character at the specified index. The charAt() method takes an integer value as a parameter i.e. it takes the index as the parameter. The index starts from 0 and […]

Java String charAt() Method Read More »

Concat Strings in Java

Concat Strings in Java | The word concatenation means to add a string to another string. The concatenation can be done by using the “+” operator. Java string class provides concat() method to add a string to another string. In this blog, let us see the different ways to concatenate strings. How concatenation of String

Concat Strings in Java Read More »

Java String hashCode() Method

Java String hashCode() Method | Java provides a method called hashcode() to retrieve hash code for the strings, it is computed as:- s[0] * 31^(n-1) + s[1] * 31^(n-2) + … + s[n-1] where s[i] is the ith character, the ‘^’ carrot symbol indicates exponential and n is the length of the string. The hash

Java String hashCode() Method Read More »

String lastIndexOf() in Java

String lastIndexOf() Method in Java | In this section, we will discuss lastIndexOf() method of the Java String class. The String lastIndexOf() method is a built-in method that returns the last index or occurrence of the given character or substring. For the lastIndexOf() method the index counter starts from 0, and if the character or

String lastIndexOf() in Java Read More »

String compareTo() Java

String compareTo() Java | In Java, two strings can be compared by using the compareTo() method. This method compares two strings lexicographically that are in dictionary order. Java String compareTo() method return type is an integer where it returns negative, positive, or 0 depending on the strings compared. If the first string is alphabetically greater

String compareTo() Java Read More »

String compareToIgnoreCase() Java

String compareToIgnoreCase() Java | Java provides the compareToIgnoreCase() built-in method in the String class to compare two strings lexicographically i.e. in dictionary order by ignoring the case. There might be a situation where we need to compare two strings ignoring their cases. In such a situation, we can use the compareToIgnoreCase() method of the Java

String compareToIgnoreCase() Java Read More »

Java String equals() Method

Java String equals() Method | The equals() method of the String class is used to compare the two strings. It returns true if both strings are content-wise equal and return false if given strings are not equal. The equals() method is mainly defined in the Java Object class, and it compares objects based on their

Java String equals() Method Read More »