PROG 10082 Study Guide - Midterm Guide: Quadratic Equation

1162 views4 pages

Document Summary

Java exam-study guide: multiple choice / true false (circle the letter beside the best answer, do not fill in the blanks, methods can be declared inside and outside of a class, true, false. You should circle one letter on each line. Compiling source files a) design time b) runtime c) both. Logic errors a) design time b) runtime c) both. Fill in the value of the variable value" after each line of code runs: __12__________, ___12_________, ____0________, ___-11_________, ______-3_______ After the code fragment runs the program will print ___value________: assume that x = 5 and y = 3. { if (y > 2) { system. out. println(here); } else. { system. out. println(there); : the java literal -456. 0 as the data type __double__________, the following line of java code has a syntax error. Describe how you would fix it. int decisionresult = true; __: write the complete program to do the following: Prompt the user to input the length and width of a rectangle.