Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (6.5k points)
Is String a wrapper class?

1 Answer

0 votes
by (11.3k points)
edited by

No.

A wrapper class is theoretically defined as one of the eight classes that wraps a primitive value in JAVA. Although a character is a primitive datatype, a String is a sequence of characters or a character array and is widely used for the purpose of representing a character sequence conveniently. A String does not wrap a SINGLE character but a SEQUENCE of characters (Even if it only contains a single character in a specific situation), making the value it contains a non-primitive value. I hope that clarifies your doubt. 

Related questions

0 votes
1 answer
asked Feb 20, 2021 in Java by rahulnayar01123 (6.1k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...