Docsity

Programming Paradigms Midterm Terms, Exams of Programming Paradigms

Toggle sidebar
bg1
Programming Paradigms
Midterm Terms
abstract - ANSThe abstract keyword is a non-access modifier, used for
classes and methods
allocate - ANSMemory allocation in Java refers to the process where the
computer programs and services are allocated dedicated to virtual memory
spaces
ArrayList - ANSAn ArrayList class is a resizable array, which is present in the
java. util package
bytecode - ANSBytecode is computer object code that an interpreter
converts into binary machine code so it can be read by a computer's
hardware processor
casting - ANSCasting is when you assign a value of one primitive data type to
another
class - ANSA class is a user defined blueprint or prototype from which objects
are created
class variable - ANSClass variables are similar to member variables but
they're declared with the static keyword
collections - ANSThe Java collections framework provides a set of interfaces
and classes to implement various data structures and algorithms
pf3
pf4
pf5

Partial preview of the text

Download Programming Paradigms Midterm Terms and more Exams Programming Paradigms in PDF only on Docsity!

Programming Paradigms

Midterm Terms

abstract - ANSThe abstract keyword is a non-access modifier, used for classes and methods allocate - ANSMemory allocation in Java refers to the process where the computer programs and services are allocated dedicated to virtual memory spaces ArrayList - ANSAn ArrayList class is a resizable array, which is present in the java. util package bytecode - ANSBytecode is computer object code that an interpreter converts into binary machine code so it can be read by a computer's hardware processor casting - ANSCasting is when you assign a value of one primitive data type to another class - ANSA class is a user defined blueprint or prototype from which objects are created class variable - ANSClass variables are similar to member variables but they're declared with the static keyword collections - ANSThe Java collections framework provides a set of interfaces and classes to implement various data structures and algorithms

compiler - ANSA compiler is a special program that translates a programming language's source code into machine code, bytecode, or another programming language ConncurrentModificationException - ANSThe ConcurrentModificationException is used to fail-fast when something being iterated on is modified constructor - ANSA Java constructor is a special method that is used to initialize objects declare - ANSUsed when you want to declare a variable default constructors - ANSA default constructor is a constructor created by the compiler if we do not define any constructor(s) for a class exceptions - ANSAn exception is an event that disrupts the normal flow of the program's instructions extends - ANSextends keyword is used to extend the functionality of the parent class to the subclass implements - ANSThe implements keyword is used to implement an interface import - ANSJava import declares a Java class to be used in the code it's being imported into inheritance - ANSInheritance in Java is the method to create a hierarchy between classes by inheriting from other classes

model-view-controller architecture - ANS-Model updates the View -View sends input to the controller -Controller manipulates the model -Sometimes the controller updates the view directly new - ANSThe new keyword is used to create an instance of the class NullPointerException - ANSNullPointerException is a runtime exception in Java that occurs when a variable is accessed which is not pointing to any object and refers to nothing or null Object and objects - ANSA java object is a member (also called an instance) of a Java class overloading - ANSMethod overloading in java is a feature that allows a class to have more than one method with the same name, but with different parameters overriding - ANSIn Java, method overriding occurs when a subclass (child class) has the same method as the parent class polymorphism - ANSpolymorphism refers to the ability of a class to provide different implementations of a method, depending on the type of object that is passed to the method primitive types - ANS- Primitive types are the most basic data types available within the Java language

-There are eight primitive types in Java: boolean, byte, char, short, int, long, float, and double

  • Boolean is always initialized to false, and the rest are initialized to 0 private - ANScan only be accessed by the class in which it is declared protected - ANScan be accessed by anything except the world (it is not visible outside the package) public - ANScan be accessed by anything reference - ANSA reference is an address that indicates where an object's variables and methods are stored reference type (aka class type) - ANSReference type variables are objects (such as String and ArrayList) and they are always initialized to null RuntimeException - ANSRuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine scope - ANSScope is when variables are only accessible inside the region they are created shadowing - ANSshadowing is the practice of using variables in overlapping scopes with the same name where the variable in low-level scope overrides the variable of high-level scope