Welcome, Guest. Please login or register.
Did you miss your activation email?
Pages: [1]   Go Down
  Print  
Author Topic: The 6 basic String classes  (Read 462 times)
0 Members and 1 Guest are viewing this topic.
_ikram
Member
*

Reputation: 3
Offline Offline
Posts: 65
Referrals: 0

Awards
« on: August 03, 2009, 01:11:35 PM »

Basically the stiring class is the class in java which is used to create string objects.
It is used to help you find the infomation about the certain string represented by the string class, i will know show you the main string methods and each description on them.

Method
char charAt (int) - returns to the start of the string.

int compareTo (String) - this compares two different strings, it uses alphabetical order, so -1 would be before the string, 0 is if the strings are the same and 1 if the string comes after another one.

int compareToIgnoreCase (String) - this is the same as CompareTo but doesnt use cases etc.

boolean contains (CharSequence) - true / false depending on the string.

boolean endsWith (String) - this is true if the string ends with a parameter string.

boolean equals (String) - returns if it has the same value.


Logged

RuneScape Developers community: www.rspsnetwork.com
Hextion Private Server: www.hextion.com
Arkie
Javaforums.net Admin
Senior Member
*

Reputation: 16
Developer @ Javaforums.net
Offline Offline
Posts: 2593
Referrals: 13

WWW Awards
« Reply #1 on: August 03, 2009, 01:26:39 PM »

Basically the stiring class is the class in java which is used to create string objects.
It is used to help you find the infomation about the certain string represented by the string class, i will know show you the main string methods and each description on them.

Method
char charAt (int) - returns to the start of the string.

int compareTo (String) - this compares two different strings, it uses alphabetical order, so -1 would be before the string, 0 is if the strings are the same and 1 if the string comes after another one.

int compareToIgnoreCase (String) - this is the same as CompareTo but doesnt use cases etc.

boolean contains (CharSequence) - true / false depending on the string.

boolean endsWith (String) - this is true if the string ends with a parameter string.

boolean equals (String) - returns if it has the same value.




char charAt (int) - returns to the start of the string. returns the char value at a given index like String.charAt(4); Good effort though.

Could be me but don't you mean the String class and it's methods? Because as far as i know there is only one String class in Java 1.6 that handles the string operations
http://java.sun.com/javas...api/java/lang/String.html

//btw a bit off topic but since we are on eachothers site what about a linkexchange? I can put a link to your site at the bottom index on the site if you can do the same.
Logged

Java and .NET developer

To students: It doesn't matter how hard you've studied; the material won't be on the exam anyway.

Fan of http://www.retardedweblogger.com
Oh man, too much stuff to do in so little time.

http://img222.imageshack....707/arkietomatoesmall.jpg
Blizzcon 2k9 Grubby and Cassandra Ng engaged ! <3
Triple D, eerste Denken Dan Doen
Pages: [1]   Go Up
  Print  
 
Jump to:  

Your Ad Here