- String is a sequence of character and character of array.
- string mystring=”Hello World”;
}
- int mystring length=mystring.length(); // For find a length of string
- string mystring in lowercase=my string . to lowercase(); //To convert uppercase to lowercase
- string mystring in upperrcase=my string . to uppercase(); //To convert lowercase to uppercase.
- string mystring=”Hello + World”; //
- System.out.println(mystring.replace(‘e’ , ‘a’)); //to replace the word.
Example:-
public class MyClass
{
public static void main(string[] arg)
{
string mystring=”Hello World”;
System.out.println(“Mystring”);
}
}
0 Comments:
Post a Comment