Exercises Java

285 downloads 5190 Views 170KB Size Report
Feb 19, 2013 ... In this exercise, we will use Java to solve quadratic equations. .... To check your programming, produce the first few Catalan numbers, and.
Exercises Java Øyvind Ryan February 19, 2013

1. What code blocks are executed, and which are not?

int smallNumber = 13; if ((smallNumber > 5) && (smallNumber < 10)){ System.out.println("Between 5 and 10"); } if ((smallNumber > 10) && (smallNumber < 15)){ System.out.println("Between 10 and 15"); } if ((smallNumber > 15) && (smallNumber