






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







keywords - ANSWER class, while and if are. primitive types - ANSWER which are simple values stored directly in the memory location reference types - ANSWER which store addresses of objects stored somewhere else in memory static - ANSWER methods not associated with any object instance - ANSWER methods are part of objects and can only be called through an object What are the two general ways of accessing a Java array? - ANSWER direct access and sequential access direct access - ANSWER accessing an arbitrary location sequential access - ANSWER going through the entire array compiler/syntax errors - ANSWER prevent program from being compiled properly,
forgetting semicolon or braces logic errors - ANSWER are problems with what the code actually does, like forgetting braces around else, so the code doesn't know what to do with else Data hiding - ANSWER when an object hides its internal data from code outside the class that the object //is an instance of. Only the class can access its own methods. Make fields private and methods public data abstraction - ANSWER using a class without knowing its implementation Details differences between array and arraylist - ANSWER - Array is a fixed length data structure
complete, the bubble sort returns to elements one and two and starts the process all over again. So, when does it stop? The bubble sort knows it is done when it looks at the entire array and no "swaps" are required (thus the list is in correct order). Linear Search - ANSWER - Start at the first of the array and look at each in order until the end of the array is reached or the element is discovered We say this is a linear run-time - or time proportional to N, the number of items in the array
advantages of arrayList - ANSWER Arrays are of fixed length. You can not change the size of the arrays once they are created.
The AWT (Abstract Windowing Toolkit) - ANSWER - was developed for the first versions of Java Created components such as Frame, Panel, Button, TextField, Label JFrames - ANSWER JFrames - are objects that will be the windows in graphical applications We can draw/paint graphics within them We can place and manipulate graphical components within them JButtons - ANSWER - JButtons are simple components that can also show text on the display However, in addition to showing text, they also respond to clicks of the mouse
the primitive value 5 is autoboxed and the address of the resulting object is sent to the myInt variable Integer.parseInt() - ANSWER is a static method that allows us to convert from a String into an int Checked exceptions - ANSWER If a method does NOT handle these, the method MUST declare that it throws them Done in a throws clause in the method header These include IOException, and InterruptedException (and their subclasses) Unchecked exceptions - ANSWER Method NOT needed to explicitly "throw" these These include RunTimeException and Error