Top "Primitive" questions

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

Why == operator and equals() behave differently for values of AnyVal in Scala

In the scaladoc of scala.Any, the operator == (or, method ==) is explained: The expression x == that is equivalent to if (…

scala equals equality primitive
How to get polygon antialiasing to work?

I'm using these function calls: glEnable(GL_BLEND) glEnable(GL_POLYGON_SMOOTH) glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE) It …

opengl polygon alphablending antialiasing primitive
Java chained inequality if (5<i<10)

Is there any operator or trick for such operation? Or is it necessary to use if(5<i && …

java types primitive logical-operators
One-byte bool. Why?

In C++, why does a bool require one byte to store true or false where just one bit is enough …

java c++ performance boolean primitive
What is the use of passing const references to primitive types?

In a project I maintain, I see a lot of code like this for simple get/set methods const int &…

c++ reference constants primitive
Java Iterator for primitive types

I have a Java class of the following form: class Example { private byte[][] data; public Example(int s) { data = new …

java iterator primitive private-members autoboxing
Are primitive types different in Java and C#?

I am manually converting code from Java to C# and struggling with (what I call) primitive types (see, e.g. …

c# java primitive first-class
How to collect the results of a Stream in a primitive array?

I'm trying to convert 2D list to a 2D int array. However, it seems I can only collect objects, not …

java java-8 java-stream primitive
Generator G's requirement to be a primitive root modulo p in the Diffie Hellman algorithm

Having searched, I've found myself confused by the use of P and G in the Diffie Hellman algorithm. There is …

cryptography root primitive modulo diffie-hellman