Top "Primitive" questions

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

Why do people still use primitive types in Java?

Since Java 5, we've had boxing/unboxing of primitive types so that int is wrapped to be java.lang.Integer, and …

java primitive primitive-types autoboxing jdk1.5
Using int vs Integer

I came across a class using Integer variables to capture size to be used in a for loop. Is this …

java integer int primitive
what does ">>>" mean in java?

I found this code to find duplicates in SO post here. but I dont understand what this line means int …

java arrays primitive
In Java, is the result of the addition of two chars an int or a char?

When adding 'a' + 'b' it produces 195. Is the output datatype char or int?

java char int primitive addition
Check type of primitive field

I'm trying to determine the type of a field on an object. I don't know the type of the object …

java reflection primitive
Javascript Error: Cannot Convert Object to Primitive Value

I'm receiving this error using the following javascript code: function tempTest(evt) { alert(evt.currentTarget.id); ct = document.getElementById(evt.…

javascript object primitive
How do I draw lines using XNA?

I've read a bunch of tutorials involving XNA (and it's various versions) and I still am a little confused on …

drawing xna lines primitive shapes
Cast primitive type array into object array in java

Why I cannot do this in java? Object[] o = (Object[])(new int[]{0,1,2,3.14,4}); I have a method that receives an object …

java arrays casting primitive
Dynamically find the class that represents a primitive Java type

I need to make some reflective method calls in Java. Those calls will include methods that have arguments that are …

java reflection types primitive
Concat an integer to a String - use String literal or primitive from performance and memory point of view?

Option 1: String newStr = someStr + 3 + "]"; Option 2: String newStr = someStr + "3" + "]"; Which option is better with regards to performance, memory and general practice? …

java string concatenation primitive