Predict the output:
class String_demo
{
public static void main(String args[])
{
char chars[] = {'a', 'b', 'c'};
String s = new String(chars);
String s1 = "abcd";
int len1 = s1.length();
int len2 = s.length();
System.out.println(len1 + " " + len2);
}
}
Answers
Answered by
3
Answer:
4 3
will be the output
Read my bio once
Similar questions
Science,
3 months ago
Social Sciences,
3 months ago
Hindi,
6 months ago
Math,
6 months ago
Computer Science,
10 months ago