Strings, which are widely used in Java programming, are a sequence of characters. In the Java programming language, strings are objects. The Java platform provides the String class to create and manipulate strings.

Classification of java:

#immutable

#String constant pool.

Program:

package demo;

public class newone {

public static void main(String[] args) {
    // TODO Auto-generated method stub
    String s="java";
    String s1="java";
    boolean R= true;
    if(s==s1) {
        System.out.println(R);
    }

}

}

output:

true


Leave a comment

Design a site like this with WordPress.com
Get started