public class test { public static void main() { = 5; i--; system.out.println("the value of is" + i); } }
in above program want value of constant i
,being reduced after every execution of program doesn't happen , can't happen. there way can reduce value of declared constant i
?
you must store outside of java.
- in environment variable
- in file
- in database
- get initial value parameter , return i+1 exit code next execution
Comments
Post a Comment