What is the Strings method ?

No comments

The  string  class  defines  a  number  of  methods  that  allows  as  to  accomplish  a  variable  of  string  methods  using  in  Java  program.

toLowerCase():    Converse  the  string  to  all  lower  case.

toUpperCase():    Converse  the  string  to  all  upper  case.

trim():     Remove  space  at  the  beginning  and  end  of  string.

equals():   Returns  true  of  strings  are  equal.

length():   Give  the  length  of  a  strings.

charAt():   Give  the  char  in  a  strings.

compareTo():    Compare   to  string,  returns  negative  (-)  value  that  indicate  first  string  less  then  another  string.  Returns  positive  (+)   value  indicate  that  first  string  is  getter  than  (>)  another  string.  Returns = indicates  two  string  are  equal.

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀