String java - What is String in java

String java :-

1) Many charactors are made a string.

2) String are constants.

3) if string is created, value of String can not be changes.

4) because String are immutable.

5) A String represents UTF-16 format.


Java gives the spacial way for concatenation of two or more strings

String a = "xyz"

char chars[] = {'x', 'y', 'z'};

String a1 = new String(data);

In the above a and a1 both objects are same.

String asd= "asd";

a = a+asd;

System.out.println(a);

6) In the String Class public boolean contentEquals(StringBuffer sb) method has synchronized block only.

Comments

Recent Post

Recent Posts Widget

Popular posts from this blog

Capture image from webcam java code, examples

Use of req.query, req.params and req.body in NODE JS

How to capture finger prints in java