Java equals Method

The Java equals method is a String Method, which compares a string with user-given Object data to check whether they both represent the same characters sequence or not. Based on the result, the Java string equals method will return Boolean True or False. This article will show how to write string equals with an example. … Read more

Java contentEquals Method

The Java contentEquals method is a String Method that compares the string with user-specified data and checks whether they both represent the same characters or not. The Java contentEquals method will return Boolean True or False based on the result. This article will show how to write contentEquals with an example. Java contentEquals syntax The … Read more

Java String contains Method

The Java contains method is one of the available String Methods. This contains function checks whether the string contains the user-specified character sequence (sequence of characters) or not. Based on the result, it will return Boolean True or False. This article will show how to write a contains method with multiple examples. The basic syntax … Read more

Java endsWith Method

The Java endsWith method is one of the String Methods to check whether the string is ending with a user-specified substring or not. The endsWith method will return Boolean True or False based on the result. In this article, we will show how to write string endsWith in Java Programming language with an example. Java … Read more

Java startsWith Method

The Java startsWith method is one of the String Methods, which is to check whether the string is starting with a user-specified substring or not. Based on the result, the Java startsWith method will return Boolean True or False. In this article, we will show how to write the startsWith with an example. The syntax … Read more

String subSequence in Java

The Java String subSequence Method returns a new character sequence that is a subsequence of the user-specified string. This article will show how to use subSequence with an example. Java subSequence Syntax The syntax of the Java string subSequence is shown below. The following method will accept the integer value, the starting index position (Starting_index), … Read more

Java substring Method

The Java substring Method is to extract the part of a string and returns it as a new one. This article will show how to use Java String Substring with an example. Before we get into the example, the basic syntax of this is Java substring Method syntax The Java Programming Language provides two different … Read more

Java lastIndexOf Method

The Java lastIndexOf Method is one of the String Methods, which is to return the index position of the last occurrence of a specified string. If the specified text is not found, this method will return -1. In this article, we will show how to use String lastIndexOf in Java Programming language with an example. … Read more

Java indexOf Method

The Java indexOf Method is one of the String Methods that return the index position of the first occurrence of a specified string. If the specified string is not found, the Java indexOf method will return -1. This article will show how to use String indexOf in Java Programming language with an example. Before we … Read more

Multi Dimensional Array in Java

The Multi Dimensional Array in Java is nothing but an Array of Arrays (more than a single dimension). The previous article discussed the 2D Array, the simplest form of Multi Dimensional Array. In Java Programming, we can declare a 2D, n-dimensional, or Multi dimensional array by placing n number of brackets [ ], where n … Read more