Top "Primitive" questions

A primitive type is a data type provided by a programming language as a basic building block.

Is an array a primitive type or an object (or something else entirely)?

The question is basically self-explanatory. I haven't been able to find an API for arrays (other than this Arrays, but …

java arrays object primitive
Hashcode of an int

What is the hashcode of a primitive type, such as int? for example, let's say num was an interger. int …

java int hashcode primitive
Which one to use, int or Integer

I need to create a data transfer object, which I will use for storing the records retrieved from database. In …

java database performance types primitive
Is String a primitive or an Object in Android or Java?

In the Android API http://developer.android.com/guide/topics/data/data-storage.html#pref It says: Shared Preference allows you …

java android string sharedpreferences primitive
Using int as a type parameter for java.util.Dictionary

When I try to declare a Dictionary as such: private Dictionary<String, int> map; The compiler gives me …

java dictionary primitive
Fastest way to check if a byte array is all zeros

I have a byte[4096] and was wondering what the fastest way is to check if all values are zero? Is …

java arrays performance primitive
typeof in Java 8

If we want to check the datatype of variable in javascript, we can use typeof operator . Consider this snippet var …

java java-8 primitive object-type
Comparing Character, Integer and similar types in Java: Use equals or ==?

I wanted to make sure about something in Java: If I have a Character or an Integer or a Long …

java equals primitive
Java Double vs double: class type vs primitive type

I was curious to what the performance differences between Java's class and primitive type for double were. So I created …

java performance class double primitive
Integer.class vs int.class

What is the difference between Integer.class, Integer.TYPE and int.class? acc to me Integer.class is a reference …

java reflection primitive