About 357,000 results
Open links in new tab
  1. Java String Constructors

    Jun 12, 2019 · Java String Constructors are used to create astring object. Java String Constructor examples with byte array encoding, char array, StringBuffer, StringBuilder.

  2. String Class in Java - GeeksforGeeks

    6 days ago · In Java, the StringBuilder class is a part of the java.lang package that provides a mutable sequence of characters. Unlike String (which is immutable), StringBuilder allows in-place modifications, making it memory-efficient and faster for frequent string operations. Declaration: StringBuilder sb = n

  3. String (Java Platform SE 8 ) - Oracle Help Center

    Constructs a new String by decoding the specified subarray of bytes using the specified charset.

  4. String Constructor in Java With Examples 2025 - SoftwareTestingo

    Jan 5, 2024 · String Constructor Examples illustrate the versatility of Java’s String class in creating and manipulating strings. These examples showcase how developers can instantiate strings using different constructors to suit specific needs.

  5. String Constructor in Java with Example - Scientech Easy

    Feb 2, 2025 · Learn types of string class constructor in Java with example, String(String str), String(char chars[], int startIndex), String(byte byteArr[])

  6. java.lang.String Constructors and Methods with Examples

    In this Java tutorial, you will learn about String class in Java. We will go through the constructors, and methods of String class, with examples for each of them. String is a sequence of characters. java.lang.String class provides many constructors and methods to do string operations in Java.

  7. Java Constructors - GeeksforGeeks

    Apr 23, 2025 · In Java, constructors play an important role in object creation. A constructor is a special block of code that is called when an object is created. Its main job is to initialize the object, to set up its internal state, or to assign default values to its attributes.

  8. String Class Constructors in Java - Java samples

    Sep 12, 2007 · The String class provides a variety of constructors to handle this. To create a String initialized by an array of characters, use the constructor shown here: String(char chars[ ])

  9. String Constructor in Java - Know Program

    String Constructor in Java. String class has a total of 15 constructors among them below 8 are regularly used constructors. Example:- public String(String s)

  10. string constructor in java and char array to string java - JavaGoal

    Jul 13, 2020 · Let’s how to convert a char array to string java. public class StringExample { public static void main(String[] args) { char[] charArray = {'J', 'a', 'v', 'a', 'G', 'o', 'a', 'l'}; String str = new String(charArray); System.out.println("Value of String: "+ str); } } Output: Value of String: JavaGoal. 4. String(StringBuffer buffer)

  11. Some results have been removed
Refresh