java string methods

java string methods tutorial explained

#java #string #methods

public class main {

public static void main(string[] args) {

// string = a reference data type that can store one or more characters
// reference data types have access to useful methods

string name = "bro";

//boolean result = name.equalsignorecase("bro");
//int result = name.length();
//char result = name.charat(0);
//int result = name.indexof("o");
//boolean result = name.isempty();
//string result = name.touppercase();
//string result = name.tolowercase();
//string result = name.trim();
//string result = name.replace('o', 'a');



java string methods