1/7
Flashcards for COSC 3011 - Software Design Spring 2025 Quiz 1 review.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Integer Data Types in Java
Integer data types in Java: byte, short, int, and long.
How to make a method global in Java
Make the method "public static".
How to compile a Java program
javac HelloWorld.java
Types of variables in Java
Primitives and Object references.
Declare and initialize an array of integers in Java
int[ ] nums = {1, 2, 3, 4, 5};
Does Dog[ ] dogs = new Dog[10]; create 10 Dog objects?
False. It creates an array to hold 10 Dog references.
How many Book objects and object references are created?
Book b1 = new Book();
Book b2 = new Book();
Book b3 = b2;
b2 = null;
2 Book objects and 3 object references.
Where does the JVM allocate memory for an object created with the keyword new?
Heap