Computer Science, asked by Aagnick16, 1 day ago

what is string manipulation in java? How to implement it?​

Answers

Answered by jeevrajmedhi04
1

Answer:

String manipulation is a sequence of characters. They are widely used in Java. In java, strings are used to create objects. It is not a primitive type and is used to create and store immutable things. Simply you can take it as constant because you can't change it once created.

public class StringExample{

public static void main(String args[]){

String s1="java";//creating string by Java string literal.

char ch[]={'s','t','r','i','n','g','s'};

String s2=new String(ch);//converting char array to string.

String s3=new String("example");//creating Java string by new keyword

Similar questions