Rédigé par des étudiants ayant réussi Disponible immédiatement après paiement Lire en ligne ou en PDF Mauvais document ? Échangez-le gratuitement 4,6 TrustPilot
logo-home
Resume

Summary Explanation of the Inbuilt Methods in JAVA

Note
-
Vendu
1
Pages
8
Publié le
01-02-2021
Écrit en
2020/2021

This is an in-depth explanation of the 'Inbuilt Methods in JAVA'. After just reading this you won't have any difficulties in writing the code. All datatypes (float, integer, double, char, etc.) are explained in this just for $4.99.00

Montrer plus Lire moins
Établissement
Cours

Aperçu du contenu

Inbuilt Methods


Methods of Class String –

int length()
Returns the number of characters that the invoking string contains.


char charAt(int i)
Returns the character at the specified index i within the invoking string.


int compareTo(String s)
Compares the invoking string with the string referred by s lexicographically, and returns the difference of the
Unicode of characters at the index where the Unicode of the characters differ, as int value. If both the strings are
same, zero is returned. Case of the characters is considered. If the invoking string is a substring within the string
referred by s or vice versa, starting from index 0, then the number of extra characters is returned as a int value.


int compareToIgnoreCase(String s)
Compares the invoking string with the string referred by s lexicographically, and returns the difference of the
Unicode of characters at the index where the Unicode of the characters differ, as int value. If both the strings are
same, zero is returned. Case of the characters is not considered. If the invoking string is a substring within the
string referred by s or vice versa, starting from index 0, then the number of extra characters is returned as a int
value.


boolean equals(String s)
Compares the invoking string with the string referred by s, for equality, and returns the boolean value true if
both the string are equal otherwise returns the boolean value false. Case of the characters is considered.


boolean equalsIgnoreCase(String s)
Compares the invoking string with the string referred by s, for equality, and returns the boolean value true if
both the string are equal otherwise returns the boolean value false . Case of the characters is not considered.


String substring(int si)
Forms a new string which is a substring of the invoking string, starting from index si till the last character, and
returns the binary address of the new string.

, String substring(int si,int li)
Forms a new string which is a substring of the invoking string, starting from index si till the character before the
character at index li, and returns the binary address of the new string.


String concat(String s)
Forms a new string after appending the copy of the string referred by s, to the end of the copy of the invoking
string, and returns the binary address of the new string.


boolean endsWith(String s)
Tests if the invoking string ends with the string referred by s, and returns the boolean value true if it is true else
returns the boolean value false.


boolean startsWith(String s)
Tests if the invoking string starts with the string referred by s, and returns the boolean value true if it is true else
returns the boolean value false.


int indexOf(int c)
Returns the index of the first occurrence of the specified character c within the invoking string.


int indexOf(String s)
Returns the index of the first occurrence of the string referred by s, within the invoking string.


int lastIndexOf(int c)
Returns the index of the last occurrence of the specified character c within the invoking string.


String replace(char oc,char nc)
Forms a new string after replacing all occurrences of character oc with character nc, in the invoking string, and
returns the binary address of the new string.


String replaceAll(String os,String ns)
Forms a new string after replacing all occurrences of the string referred by os with string referred by ns, in the
invoking string, and returns the binary address of the new string.


String toLowerCase()
Forms a new string after converting all the characters of the invoking string, to lower case, and returns the
binary address of the new string.


String toUpperCase()

École, étude et sujet

Établissement
Lycée
Cours
Année scolaire
4

Infos sur le Document

Publié le
1 février 2021
Nombre de pages
8
Écrit en
2020/2021
Type
RESUME

Sujets

$3.49
Accéder à l'intégralité du document:

Mauvais document ? Échangez-le gratuitement Dans les 14 jours suivant votre achat et avant le téléchargement, vous pouvez choisir un autre document. Vous pouvez simplement dépenser le montant à nouveau.
Rédigé par des étudiants ayant réussi
Disponible immédiatement après paiement
Lire en ligne ou en PDF

Faites connaissance avec le vendeur
Seller avatar
utkarshsrivastava

Faites connaissance avec le vendeur

Seller avatar
utkarshsrivastava
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
1
Membre depuis
5 année
Nombre de followers
1
Documents
3
Dernière vente
5 année de cela

0.0

0 revues

5
0
4
0
3
0
2
0
1
0

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Vous travaillez sur vos références ?

Créez des citations précises en APA, MLA et Harvard avec notre générateur de sources gratuit.

Vous travaillez sur vos références ?

Foire aux questions