172k views
2 votes
Which of the following illustrates the proper declaration of a variable and data type to hold a whole number?

int myNumber = 10;

Int myNumber = "10";

myNumber = 10 + "10";

float myNumber = 5;

User Chetbox
by
7.6k points

1 Answer

4 votes
The first one,

int myNumber = 10;
User Escapecharacter
by
8.3k points