left() function help.

hello guys, is there a left function in java?how ill i get only the first letter of a string?thank you.killuasoft
[141 byte] By [killuasofta] at [2007-11-27 10:01:27]
# 1

> is there a left function in java?

No.

> how ill i get only the first letter of a string?

Check the API documentation for String, and look for a method that will return what you want: either a substring (consisting of the first character of the string), or the char at the first position.

pbrockway2a at 2007-7-13 0:34:38 > top of Java-index,Java Essentials,New To Java...
# 2

> hello guys,

>

> is there a left function in java?how ill i

> get only the first letter of a string?

>

> thank you.

>

> killuasoft

Can you find the Javadocs (API documentation)? Here, let me find it for you:

http://java.sun.com/javase/6/docs/api/

Now, can you then find the String class documentation given that link, and see what is available?

warnerjaa at 2007-7-13 0:34:38 > top of Java-index,Java Essentials,New To Java...