CPSC 2150 Exam 1 || A+ Graded Already.
When zipping up our directory on unix, which flag will we use to include all the subdirectories and their files as well? correct answers -r Which of the following are included in a Makefile command? (may be more than one) correct answers target, dependencies, unix command to run In java, a main function must... correct answers Be inside of a class Be static Have one argument, an array of strings Anything that is not one of the 8 primitive data types in Java is a... correct answers Reference data type In Java, when comparing two variables that are not primitive data types to see if they are equal we should always use... correct answers .equals() Immutable Object correct answers an object who's abstract value never changes. The abstract value in the memory location will remain unchanged, however, the pointer could be changed to point to a new memory location. This protects us from aliasing errors. (T/F) Unlike in C++, in Java we don't have a way to explicitly free up memory from a variable that we will no longer use. correct answers True In Java, a class can have multiple constructors correct answers True What are the three parts of a UML class diagram? correct answers The methods of the class The name of the class The attributes of the class Which Symbol is used to show that an attribute or method is package visible? correct answers ~ In a UML Activity diagram, an "Activity" can be something that would take multiple lines of code to write, as long as it does not require and decisions (T/F) correct answers True Every single class in Java extends which class? correct answers Object class If you do not override the toString method in a class that you create, what will happen when you call toString on an object of that class? correct answers A string showing the memory address will be returned A class can be in multiple packages (T/F) correct answers False! In Java, if you do not specify a visibility level for a class, the visibility level will be ________________________________ correct answers package A static member belongs to.... correct answers the class
Written for
- Institution
- CPSC 2150
- Course
- CPSC 2150
Document information
- Uploaded on
- March 25, 2024
- Number of pages
- 6
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
when zipping up our directory on unix which flag
Also available in package deal