About 217,000 results
Open links in new tab
  1. What are Java's primitive types? - Stack Overflow

    Any data type built-in to a programming language is called primitive data type. Words primitive or built-in or basic data types are used interchangeably by authors. Primitive data types in Java …

  2. java - What's the difference between primitive and reference types ...

    51 These are the primitive types in Java: boolean byte short char int long float double All the other types are reference types: they reference objects. This is the first part of the Java tutorial …

  3. When to use wrapper class and primitive type - Stack Overflow

    Oct 15, 2009 · Primitive values in Java are not object. In order to manipulate these values as object the java.lang package provides a wrapper class for each of the primitive data type.

  4. What is the real difference between primitives and wrapper classes …

    Aug 7, 2020 · The real difference is that primitive types are not reference types. In Java type system, reference types have a common root, while primitive types do not: All reference types …

  5. Should I use Primitive or Object for entity and models in Java?

    May 15, 2021 · 9 As a beginner at Java, I am confused while choosing the variable types in entity or model classes. As mentioned on Java Primitives versus Objects, both of them have some …

  6. java - Create a List of primitive int? - Stack Overflow

    Aug 2, 2013 · 10 Is there a way to create a list of primitive int or any primitives in java No you can't. You can only create List of reference types, like Integer, String, or your custom type. It …

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

    Jul 15, 2013 · Why doesn't Java have a primitive type for String when most of the other data types do?

  8. In Java, why is String a non-primitive data type? - Stack Overflow

    Apr 15, 2025 · 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 …

  9. Why do people still use primitive types in Java? - Stack Overflow

    Mar 5, 2011 · On the other hand, current Java language specification doesn’t allow usage of primitive types in the parameterized types (generics), in the Java collections or the Reflection …

  10. java - How to determine the primitive type of a primitive variable ...

    Sep 11, 2012 · Is there a "typeof" like function in Java that returns the type of a Primitive Data Types (PDT) variable or an expression of operands PDTs? instanceof seems to …