Top "Primitive" questions

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

Are primitive data types in c# atomic (thread safe)?

For example, do I need to lock a bool value when multithreading?

c# atomic primitive thread-safety
Is it possible to use a primitive type (int) in as a generic type in Java?

Specifically, with a SortedMap<Vector<String>, int> I get "dimensions expected after this (int) token." Help!

java generics types primitive
Java: Why am I required to initialize a primitive local variable?

public class Foo { public static void main(String[] args) { float f; System.out.println(f); } } The print statement causes the …

java primitive
Java storing two ints in a long

I want to store two ints in a long (instead of having to create a new Point object every time). …

java bit-manipulation primitive
Is an int a 64-bit integer in 64-bit C#?

In my C# source code I may have declared integers as: int i = 5; or Int32 i = 5; In the currently prevalent 32…

c# 64-bit 32-bit primitive
When should I use primitives instead of wrapping objects?

Actually here is a similar topic with little practical value. As far as I understand, primitives perform better and should …

java performance object primitive
Is there ever a good time to use int32 instead of sint32 in Google Protocol Buffers?

I've been reading up on Google Protocol Buffers recently, which allows for a variety of scalar value types to be …

protocol-buffers primitive
What's the largest value an NSNumber can store?

What's the largest value an NSNumber can store? // ok NSNumber *value = @(1 << 31); // gives compiler error, so max NSNumber is 32…

objective-c max nsnumber primitive
Why does autoboxing in Java allow me to have 3 possible values for a boolean?

Reference: http://java.sun.com/j2se/1.5.0/docs/guide/language/autoboxing.html "If your program tries to autounbox null, it …

java wrapper primitive autoboxing unboxing
Passing enums through aidl interfaces

As enums aren't primitive types, what's the most effective way to pass an enum through an aidl interface in Android? …

java android enums primitive aidl