Java Examples
Sun certification level tutorial and examples Organized by topic.
Saturday, March 14, 2009
java operator precedence example
class
EvolutionOrder
{
public static void
main(String arg[])
{
System.out.println(m1(1) +m1(2)*m1(3)/m1(4)-m1(5)* m1(6));
}
public static int
m1(int i)
{
System.out.println(i);
return
i;
}
}
output:
1
2
3
4
5
6
-28
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment