Increment and Decrement Operator:-
Increment Operator(++) :- ++ is called increment operator and it is increases the
variable by '1'(one). Java is supported to two types of increment operators:- 1) pre increment operator 2) post increment operator Pre increment operator: The ++ is placed before the variable then it is called pre increment operator. Eg:- ++a, ++s Post increment operator: The ++ is placed after the variable then it is called pre increment operator. Eg:- a++, b++ Decrement Operator(++) :- -- is called decrement operator and it is decreases the
variable by '1'(one). Java is supported to two types of increment operators:- 1) pre increment operator 2) post increment operator Pre decrement operator: The -- is placed before the variable then it is called pre increment operator. Eg:- --a, --s Post decrement operator: The -- is placed after the variable then it is called pre increment operator. Eg:- a--, b--
Saturday, September 24, 2016
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment