PRO 192 FULL EXAM PREP STUDY GUIDE | 100% Correct | Verified | 2024 Version
2 views 0 purchase
Course
PRO 192 FULL
Institution
PRO 192 FULL
A, B, D - - - - Which of the following are valid declarations? Assume .* is imported. (choose 3)
A. Vector<Map> v;
B. Set<String> s;
C. Map<String> m;
D. Map<String, String> m;
A - - - - You can determine all the keys in a Map in which of the following ways?
A⦁ By ge...
PRO 192 FULL EXAM PREP STUDY GUIDE | 100% Correct | Verified | 2024 Version A, B, D - - - - ✔✔Which of the following are valid declarations? Assume java.util.* is imported. (choose 3) A. Vector<Map> v; B. Set<String> s; C. Map<String> m; D. Map<String, String> m; A - - - - ✔✔You can determine all the keys in a Map in which of the following ways? A⦁ By getting a Set object from the Map and iterating through it. B⦁ By iterating through the Iterator of the Map. C⦁ By enumerating through the Enumeration of the Map. D⦁ By getting a List from the Map and enumerating through the List. E⦁ You cannot determine the keys in a Map D - - - - ✔✔What keyword is used to prevent an object from being serialized? A ⦁ private B ⦁ volatile C ⦁ protected D ⦁ transient E ⦁ None of the above A - - - - ✔✔An abstract class can contain methods with declared bodies. A ⦁ True B ⦁ False E - - - - ✔✔Select the order of access modifiers from least restrictive to most restrictive. A ⦁ public, private, protected, default B ⦁ default, protected, private, public C ⦁ public, default, protected, private D ⦁ default, public, protected, private E ⦁ public, protected, default, private C - - - - ✔✔Which access modifier allows you to access method calls in libraries not created in Java? A ⦁ public B ⦁ static C ⦁ native D ⦁ transient E ⦁ volatile D - - - - ✔✔Which of the following statements are true? (Select all that apply.) A ⦁ A final object's data cannot be changed. B ⦁ A final class can be subclassed. C ⦁ A final method cannot be overloaded. D ⦁ A final object cannot be reassigned a new address in memory. E ⦁ None of the above. A - - - - ✔✔The keyword extends refers to what type of relationship? A ⦁ "is a" B ⦁ "has a" C ⦁ "was a" D ⦁ "will be a" E ⦁ None of the above B - - - - ✔✔Which of the following keywords is used to invoke a method in the parent class? A ⦁ this B ⦁ super C ⦁ final D ⦁ static C - - - - ✔✔Given the following code, what will be the outcome? public class Funcs extends java.lang.Math { public int add(int x, int y) { return x + y; } public int sub(int x, int y) { return x - y; } public static void main(String [] a) { Funcs f = new Funcs(); System.out.println("" + f.add(1, 2)); } } A ⦁ The code compiles but does not output anything. B ⦁ "3" is printed out to the console. C ⦁ The code does not compile. D ⦁ None of the above. D - - - - ✔✔Given the following code, what is the expected outcome? public class Test { public static void main(String [] a) { int [] b = [1,2,3,4,5,6,7,8,9,0]; System.out.println("a[2]=" + a[2]); } } A ⦁ The code compiles but does not output anything. B ⦁ "a[2]=3" is printed out to the console. C ⦁ "a[2]=2" is printed out to the console. D ⦁ The code does not compile. E ⦁ None of the above. D - - - - ✔✔What is the value of x after the following operation is performed? x = 23 % 4; A. 23 B. 4 C. 5.3 D. 3 E. 5 C - - - - ✔✔Given the following code, what keyword must be used at line 4 in order to stop execution of the for loop? boolean b = true; for (;;) { if (b) { <insert code> } // do something } A ⦁ stop B ⦁ continue C ⦁ break D ⦁ None of the above B - - - - ✔✔What method call is used to tell a thread that it has the opportunity to run?
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller BESTSTUDYMATERIALS. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $15.99. You're not tied to anything after your purchase.