String Declaration In Java

String Declaration In Java

String Declaration In Java


string declaration in java,string functions in java,split method in java,string manipulation in java


String function in Java Program

class str
{
public Static void main(String args[])
{
string a="sam";
string b="kumar";
System.out.println("The given length of given string is:"+a.length());
System.out.println("The uppercase letter of a is:"+a.to UpperCase());
System.out.println("The lowercase letter of a is:"+a.to LowerCase());
System.out.println("The given character of string is:"+a.indexOf('t'));
System.out.println("The given concatenation of two string is:"+A.concat(b));
System.out.println("The given replace of string is:"+A.replace('S','R'));
}

}

Post a Comment

0 Comments