Unary Operator
The Unary Operators are as follows.... => - => ++ => -- We will see a program in JAVA on Unary Operators class Unary { Public Static void main(Sring a[]) { int a=10; System.Out.println("the value of a="+a); System.Out.println("the value of -a="+(-a)); System.Out.println("the value of ++a="+(++a)); System.Out.println("the value of a="+a); System.Out.println("the value of a++="+(a++)); System.Out.println("the value of a="+a); System.Out.println("the value of --a="+(--a)); System.Out.println("the value of a-- ="+(a--)); } } Can anyone predict the output of the program???????? Lets see about the remaining operators in our next post. Have a tremendous Tuesday......
Monday, September 26, 2016
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment