Computer Science, asked by sakshisharmamtms, 6 days ago

what are the default values of primitive data type int and float​

Answers

Answered by yathukrishna15
2

Answer:

if two variables contain data that is primitive they compare by value. This means that if they both contain the same values they are equal. If two variables contain data that is composite they compare by reference. This means that they can only be equal if they refer to the same object.

Answered by shahabuddinsamejo677
1

Explanation:

The Java programming language is statically-typed, which means that all variables must first be declared before they can be used. This involves stating the variable's type and name, as you've already seen:

int gear = 1;

Doing so tells your program that a field named "gear" exists, holds numerical data, and has an initial value of "1". A variable's data type determines the values it may contain, plus the operations that may be performed on it. In addition to int, the Java programming language supports seven other primitive data types. A primitive type is predefined by the language and is named by a reserved keyword. Primitive values do not share state with other primitive values. The eight primitive data types supported by the Java programming language are:

Similar questions