From 11f01c4c0dc5e45559cacb33845f1e0effa9933e Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 5 Mar 2020 02:54:41 -0600 Subject: [PATCH] post pre increment decrement order in conjunction with precedence --- study/STUDY.MD | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/study/STUDY.MD b/study/STUDY.MD index ecfdc3a..da48209 100644 --- a/study/STUDY.MD +++ b/study/STUDY.MD @@ -52,6 +52,7 @@ If you find something incorrect, feel free to contribute and modify. - [`hasNext` and `hasNextInt`](#hasnext-and-hasnextint) - [`next` and `nextInt`](#next-and-nextint) - [Examples with Explanations](#examples-with-explanations) + - [Post-increment and Post-decrement Order is Important](#post-increment-and-post-decrement-order-is-important) @@ -611,3 +612,15 @@ s = new Scanner("2 h j l 3 4 o p 0 9"); for(int i = 0; i++ < 5;) out.println(s.nextInt()); ``` + + +### Post-increment and Post-decrement Order is Important + +```java +public static int m(int x, int y) { + if(x == 0) + return 1; + else + return m(--x, y) * x; +} +``` \ No newline at end of file