0% found this document useful (0 votes)
7 views1 page

Java String Manipulation Examples

The document contains a Java program that demonstrates various string manipulation methods. It showcases methods such as charAt, length, concat, replace, toLowerCase, toUpperCase, equals, equalsIgnoreCase, startsWith, endsWith, and compareTo. Each method is called with specific examples, and the results are printed to the console.

Uploaded by

hanukumar2007
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Java String Manipulation Examples

The document contains a Java program that demonstrates various string manipulation methods. It showcases methods such as charAt, length, concat, replace, toLowerCase, toUpperCase, equals, equalsIgnoreCase, startsWith, endsWith, and compareTo. Each method is called with specific examples, and the results are printed to the console.

Uploaded by

hanukumar2007
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

import [Link].

*;
class PG
{
public static void main (String args[])
{
[Link]("Bytes Classes".charAt(8));
[Link]("BARACK OBAMA".length());
[Link]("BYTES".concat("CLASSES"));
[Link]("Bytes".replace('y','i'));
[Link]("Java".replace("a","e"));
[Link]("ANUP".toLowerCase());
[Link]("anup".toUpperCase());
[Link]("HELLO".equals("Hello"));
[Link]("Hello".equalsIgnoreCase("Hello"));
[Link]("Bharat".startsWith("b"));
[Link]("Bharat".endsWith("t"));
[Link]("A".compareTo("B"));
[Link]("Patna".compareTo("Pune"));
}
}

You might also like