Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Samenvatting

Summary Explanation of the Inbuilt Methods in JAVA

Beoordeling
-
Verkocht
1
Pagina's
8
Geüpload op
01-02-2021
Geschreven in
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

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

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()

Geschreven voor

Instelling
Middelbare school
Vak
School jaar
4

Documentinformatie

Geüpload op
1 februari 2021
Aantal pagina's
8
Geschreven in
2020/2021
Type
SAMENVATTING

Onderwerpen

$3.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
utkarshsrivastava

Maak kennis met de verkoper

Seller avatar
utkarshsrivastava
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
1
Lid sinds
5 jaar
Aantal volgers
1
Documenten
3
Laatst verkocht
5 jaar geleden

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen