notes10-23 - /////////////////////// int i = 1 do{...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 ++i --i Prefix i++ i-- Postfix n=4 print(++n) //= 5 i=1 y=++i //= 2 print(n--) //prints 4 //then n=3 //////////////////////// while(expression){ statements } //////////////////////// int i = 0 while(i<=5){ print("i="+i) } //////////////////////// do-while loop do{ statements { while ( expression )
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: /////////////////////// int i = 1 do{ System.out.println(i) } while (x&lt;0) //does once, and if false in while, it will stop. If true, it will loop until false ////////////////////////-for loop good for known # iterations for(int i = 0 i&lt; 10 i++){ System.out.println(i) Sheet1 Page 2 }...
View Full Document

Page1 / 2

notes10-23 - /////////////////////// int i = 1 do{...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online