Top "Primitive" questions

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

Converting characters to integers in Java

Can someone please explain to me what is going on here: char c = '+'; int i = (int)c; System.…

java integer type-conversion character primitive
Java equivalent of unsigned long long?

In C++, I enjoyed having access to a 64 bit unsigned integer, via unsigned long long int, or via uint64_t. …

java unsigned primitive unsigned-long-long-int
How to cast Object to boolean?

How can I cast a Java object into a boolean primitive I tried like below but it doesn't work boolean …

java casting primitive
What's the difference between primitive and reference types?

This is a past exam question and I was wondering what a primitive type and reference type are first off? …

java types reference primitive
Java: Integer equals vs. ==

As of Java 1.5, you can pretty much interchange Integer with int in many situations. However, I found a potential defect …

java integer wrapper primitive equals-operator
Generic type conversion FROM string

I have a class that I want to use to store "properties" for another class. These properties simply have a …

c# generics primitive type-safety
Primitive type 'short' - casting in Java

I have a question about the primitive type short in Java. I am using JDK 1.6. If I have the following: …

java casting primitive short
How can you pass multiple primitive parameters to AsyncTask?

There are related questions, such as How can I pass in 2 parameters to a AsyncTask class? , but I ran into …

android android-asynctask primitive variadic-functions
Why is typeof null "object"?

I'm reading 'Professional Javascript for Web Developers' Chapter 4 and it tells me that the five types of primitives are: undefined, …

javascript primitive
Why don't Java Generics support primitive types?

Why do generics in Java work with classes but not with primitive types? For example, this works fine: List<…

java generics primitive