About 3,610,000 results
Open links in new tab
  1. In Java, why is String a non-primitive data type? - Stack Overflow

    In Java, we can directly use String to declare a string variable name and specify its value. We do not have to define the string as an array by using new keyword, even though String is non …

  2. Is String a Primitive or a Derived Type? - GeeksforGeeks

    Jun 28, 2022 · Definitely, String is not a primitive data type. It is a derived data type. Derived data types are also called reference types because they refer to an object. They call methods to …

  3. Java Non-Primitive Data Types - W3Schools

    Non-primitive types can be used to call methods to perform certain operations, whereas primitive types cannot. Primitive types start with a lowercase letter (like int), while non-primitive types …

  4. Is String a Primitive Data Type or an Object in Java

    The String data type in Java is not primitive; it is an object of the String class. The String class provides a rich set of methods for string manipulation, and its immutable nature ensures that …

  5. Java Data Types: Primitive & Non-Primitive | Medium

    Nov 16, 2023 · Java classifies data types into two categories: primitive and non-primitive. Understanding these types is crucial for efficient programming and code optimization. What …

  6. Primitive Data Types (The Java™ Tutorials - Oracle

    Primitive values do not share state with other primitive values. The eight primitive data types supported by the Java programming language are: byte: The byte data type is an 8-bit signed …

  7. Non-Primitive Data Types in Java

    Java provides pre-defined non-primitive types like String and collections from the java.util package, but we can create an infinite number of non-primitive types (classes, interfaces, etc.) …

  8. Is `String` a primitive data type in Java? - TinyGrab

    Apr 14, 2025 · String Literals: Java allows creating String objects using string literals (e.g., "Hello"), which resembles the way primitives are initialized. String Concatenation: The + …

  9. java - Why is there no primitive type for String? - Stack Overflow

    Jul 15, 2013 · String is an object, it isn't a primitive type at all, just an array of chars. The reason why primitive types exist in Java at all is an interesting one, excerpt from a James Gosling …

  10. Is string a primitive data type in Java? - clrn.org

    Nov 30, 2024 · In Java, string is a reference data type. This means that a string is not a primitive data type, but rather a collection of characters that are stored in memory.

Refresh