Engineering Science 1036A/B Study Guide - Final Guide: Boolean Expression, For Loop, While Loop

5 views8 pages

Document Summary

2 parts: 1: give codes (give guidelines for codes) 10-15 questions (20% of the whole exam, provide output of execution, codes given can compile, 2: 80% of the whole exam. Int [] a; int [] aa = new int [3]; Output: 0,0,0 int [] aa = new int [3]; Output: false (b/c we compare the memory addresses for b and c) Output: 4 (the number of characters in the first element (java)) String [] cc = { java , is , fun }; bb=cc; // string [] bb = new string [3]; Output: true (bb. equals. (cc)) output is false. Output: false (a1. equals. (a2)) output is true public class any { private int n=10; public int get n () { return (n); Public static void main (string [] args) { Output: 10 no syntax error in code. For loop: use when we know how many times we want to repeat. While loop: run provided the condition is true.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers