KnowledgeBoat Logo

Computer Applications

Provide the declaration for two variables called xCoordinate and yCoordinate. Both variables are of type int and both are to be initialised to zero in the declaration.

Values & Data Types Java

ICSE

19 Likes

Answer

int xCoordinate = 0;  
int yCoordinate = 0;

OR

int xCoordinate = 0, yCoordinate = 0;  

Answered By

8 Likes


Related Questions