Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,870 questions

51,793 answers

573 users

What are the string handling functions in Java

1 Answer

0 votes
public class MyClass {
    public static void main(String args[]) {
        String s1 = "java python";
        String s2 = "c++ c c#";

        System.out.println(s1.equals(s2));
        System.out.println(s1.charAt(2));
        System.out.println(s1.concat(" php"));
        System.out.println(s1.length());
        System.out.println(s1.toLowerCase());
        System.out.println(s1.toUpperCase());
        System.out.println(s1.indexOf('a'));
        System.out.println(s1.substring(0, 6));
        System.out.println(s1.substring(7));  
    }
}




/*
run:

false
v
java python php
11
java python
JAVA PYTHON
1
java p
thon

*/

 



answered Jun 8, 2023 by avibootz

Related questions

1 answer 157 views
1 answer 218 views
1 answer 174 views
1 answer 125 views
1 answer 169 views
169 views asked Dec 16, 2016 by avibootz
...