Add

Showing posts with label how to declare constants in java. Show all posts
Showing posts with label how to declare constants in java. Show all posts

Friday, November 16, 2018

How to declare constants


How to declare constants


•There are two ways to declare a constant value
•1- write the word constant before the name of datatype e.g. const int x or const float pi
•2- declare it before main() function.
•E.g . #define pi = 3.14