CISC 124 Final Exam Questions & Answers 2024/2025
primitive type - ANSWERSA variable data type in which the variable's value is of the appropriate size and format for its type: a number, a character, or a boolean value.
Char
byte
short
int
long
float
double
boolean
Variable decele...
primitive type - ANSWERSA variable data type in which the variable's value is of the appropriate size and
format for its type: a number, a character, or a boolean value.
Char
byte
short
int
long
float
double
boolean
Variable decelerations - ANSWERSint number = 6
expressions - ANSWERSpieces of code that produce a value
conditions - ANSWERStrue or fales
loops - ANSWERSrunning the same sequence multiple times
Type Casting - ANSWERSConverting data from one type to another, e.g., from string to int, potentially
losing information.
system.out.printf() - ANSWERSYou an use this method to display formatted output in a console window.
Scanner class - ANSWERSProvides convenient methods for reading input values of various types.
,single arrays - ANSWERSjava array is an object which contains elements of a similar data type. It is a data
structure where we store similar elements. We can store only a fixed set of elements in a Java array.
Array in java is index-based, the first element of the array is stored at the 0 index.
multi-dimensional arrays - ANSWERSint[][] a = new int[3][4];
The ArrayList<T> class - ANSWERSThe ArrayList<T> class resides in the java.util
package. Stores and returns Objects of type T
Aliasing objects - ANSWERSRemember that when you make an assignment to an object variable, you are
assigning a reference to an object. It is possible to have multiple variables that refer to the same object
StringTokenizers - ANSWERSin the java.util package
this class provides an easy way of parsing strings up into pieces called tokens
tokens are separated by diemiters that you can specify
Wrapper classes - ANSWERSA Wrapper class is a class whose object wraps or contains a primitive data
types. When we create an object to a wrapper class, it contains a field and in this field, we can store a
primitive data types. In other words, we can wrap a primitive value into a wrapper class object.
Enumerated types - ANSWERSkeyword enum
contents are not strings but instead objects
Should be used in UPPER CASE
equals()
• toString()
• compareTo()
• ordinal()
• values()
, Importing packages - ANSWERSpackage is a java keyword
groups classes together into a package
package package_name;
• This line is at the top of a class definition, before
the public class...
import folder.packagename.*;
• The ".*" says to import all classes in the package,
or you can import specific classes.
Packages and use of static import - ANSWERSUsed to import all static methods in a class, so
that they can be used as if they were declared
within the class that uses them.
• For example:
import static org.junit.jupiter.api.Assertions.*;
• Another example:
import static java.lang.Math.*;
Use of modules in Java - ANSWERSA Java Module is a mechanism to package up your Java application
and Java packages into Java modules. A Java module can specify which of the Java packages it contains
that should be visible to other Java modules using this module. ... Java modules is a new feature in Java 9
via the Java Platform Module System (JPMS)
Methods - use and declaration. - ANSWERSThree aspects to consider:
1. Naming the method.
2. Providing arguments(s) or not.
3. Doing something with the return value or not
Passing parameters by value and by reference - ANSWERSJava does manipulate objects by reference, and
all object variables are references. However, Java doesn't pass method arguments by reference; it passes
them by value. The method successfully alters the value of pnt1 , even though it is passed by value;
however, a swap of pnt1 and pnt2 fails
Les avantages d'acheter des résumés chez Stuvia:
Qualité garantie par les avis des clients
Les clients de Stuvia ont évalués plus de 700 000 résumés. C'est comme ça que vous savez que vous achetez les meilleurs documents.
L’achat facile et rapide
Vous pouvez payer rapidement avec iDeal, carte de crédit ou Stuvia-crédit pour les résumés. Il n'y a pas d'adhésion nécessaire.
Focus sur l’essentiel
Vos camarades écrivent eux-mêmes les notes d’étude, c’est pourquoi les documents sont toujours fiables et à jour. Cela garantit que vous arrivez rapidement au coeur du matériel.
Foire aux questions
Qu'est-ce que j'obtiens en achetant ce document ?
Vous obtenez un PDF, disponible immédiatement après votre achat. Le document acheté est accessible à tout moment, n'importe où et indéfiniment via votre profil.
Garantie de remboursement : comment ça marche ?
Notre garantie de satisfaction garantit que vous trouverez toujours un document d'étude qui vous convient. Vous remplissez un formulaire et notre équipe du service client s'occupe du reste.
Auprès de qui est-ce que j'achète ce résumé ?
Stuvia est une place de marché. Alors, vous n'achetez donc pas ce document chez nous, mais auprès du vendeur Bensuda. Stuvia facilite les paiements au vendeur.
Est-ce que j'aurai un abonnement?
Non, vous n'achetez ce résumé que pour €9,46. Vous n'êtes lié à rien après votre achat.