Top "Primitive-types" questions

Built-in types in any programming language that are defined in an axiomatic way and cannot be divided into other types in the language.

Casting an instance of Object to primitive type or Object Type

when I need to cast an instance of type Object to a double , which of the following is better and …

java casting primitive-types object-type
Java: Should I use float or Float?

My colleague told me that I should use float whenever possible to reduce the object creation and increase the performance. …

java object floating-point primitive-types
When to use primitive and when reference types in Java

In which case should you use primitive types(int) or reference types (Integer)? This question sparked my curiosity.

java primitive-types reference-type
SonarLint Use the primitive boolean expression here

I have the following class Properties: class Properties { private Boolean enabled; public Boolean getEnabled() { return enabled; } } If I write the …

java primitive-types sonarlint
Java: Why can't I cast int to Long

All numbers in Java are supposed to be of int type. The following line is legal in Java>1.5 Short …

java primitive-types
Using Streams with primitives data types and corresponding wrappers

While playing around with Java8's Streams-API, I stumbled over the following: To convert an array of primitive wrapper classe …

java wrapper java-8 primitive-types java-stream
What is the difference between value types and primitive types?

Reading a book about C# I noticed that sometimes is mentioned value type and sometimes primitive type for some data …

c# language-agnostic primitive-types
"Generic" solution for primitive array?

I have classes that for processing primitive array input: CharArrayExtractor for char[], ByteArrayExtractor for byte[], IntegerArrayExtractor for int[], ... public void …

java arrays refactoring primitive-types
String and Character Array in Java

I am a student who has just shifted from C++ to Java. In Java what could be the main reason …

java string char primitive-types
Do STL maps initialize primitive types on insert?

I have a std::map like this: map<wstring,int> Scores; It stores names of players and scores. …

c++ dictionary stl initialization primitive-types