[OOP] Flashcards - Module 1

1
Q

[syntax] reading a character

A

scanner_name.next().charAt(0);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

8 data types in java

A

char, boolean, byte, int, short, long, float, double

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

the only object that is defined, when a class is initially defined.

A

description

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

refer to an object’s state.

A

Attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

include defining the class encapsulating data and methods.

A

Class Definitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

This is also known as automatic type promotion.

A

Implicit Typecasting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

[syntax] typecasting char to int (for ASCII Value) and vice versa

A

int asciiValue = (int) ch ;
char ch = (char) asciiValue;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

[syntax] String content comparison

A

boolean <var_name> = str1.equals(str2); (result is either true or false)</var_name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Backslash and backspace escape sequence

A

\ and \b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

the principle where objects can share behaviors and adopt multiple forms.

A

Polymorphism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Double/Single quote escape sequence

A

" and '

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

characteristics distinguishing classes.

A

Attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

[syntax] string input using a scanner in java

A

String str = scanner_name.nextLine():

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

errors that occur during the execution of the program.

A

Runtime Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In initializing characters, they should be enclosed in ____

A

single quotes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

A form of typecasting that requires the programmer to specify the desired data type.

A

explicit typecasting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

OOP Building Blocks

A

Classes, Objects, Methods, and Attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

the syntax or semantic errors detected at compile time.

A

Compile-time Errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Basic Structure of Java

A

Package Declarations, Import Statements, Class Definitions, main() method, Statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

The data stored by the objects are kept in this field.

A

attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Import Statements in Java

A

java.util., java.io., java.net., java.math.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

used by programmers for reusability or keeping the functionality encapsulated inside one object at a time.

A

Methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

a principle where objects expose only the internal mechanisms necessary for other objects to function,

A

Abstraction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

principle that dictates that an object contains all its essential information, with only selected details made accessible.

A

Encapsulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

includes external classes and libraries into the program.

A

Import Statements

26
Q

subroutines contained in an object

A

instance methods

27
Q

Scanner method that reads a word (string without spaces)

A

scanner_name.next();

28
Q

a concept that allows classes to inherit code and properties from other classes.

A

Inheritance

29
Q

Java is a programming language developed by ____ in the mid-____ known for its versatility, efficiency, and platform independence.

A

Sun Microsystems ; 1990s

30
Q

the instructions executed by the program within methods.

A

Statements

31
Q

occurs when the compiler automatically converts a value from one data type to another without explicit instructions from the programmer.

A

implicit typecasting

32
Q

contains the Collections framework, formatted printing, and scanning.

A

java.util.*

33
Q

Errors that lead to incorrect results

A

Logical Errors

34
Q

is the package for input and output functionalities.

35
Q

character sequences surrounded by double quotes.

36
Q

the package including classes for performing arithmetic operations.

A

java.math.*

37
Q

Java operates on the “_____” principle,

A

write once, run anywhere

38
Q

[syntax] declaring a new scanner in java

A

Scanner <scanner_name> = new Scanner(System.in);</scanner_name>

39
Q

deals about creating objects that contain both data and functions.

A

Object-Oriented Programming

40
Q

the rules that define how words and punctuation are organized in a programming language.

41
Q

These represent an abstract entity.

42
Q

[syntax] String lexicographic comparison

A

int <var_name> = str1.compareTo(str2); (result is 0 = equal, (-) = str1 < str2, and (+) = str1> str2</var_name>

43
Q

describes the relationship between classes,

A

Association

44
Q

the instances of a class created with specifically defined data.

45
Q

special character combinations allowing you to represent the characters that are not printed using the normal way of printing.

A

Escape Sequences

46
Q

refer to those functions that the objects can perform, defined inside the class.

47
Q

[syntax] closing a scanner

A

scanner_name.close();

48
Q

A single- line comment in Java starts with ____ and multiline comments are enclosed between ____

A

// ; /* */

49
Q

The object behaviors are described in this

50
Q

Carriage return and form feed escape sequence

51
Q

contains networking capabilities.

A

java.net.*

52
Q

OOP Principles

A

Encapsulation, Abstraction, Inheritance, Polymorphism, Syntax, Coupling, Association

53
Q

[syntax] string copying

A

String str2 = str1.substring(0);

54
Q

it is where the program execution begins

A

main() method

55
Q

also known as format specifiers, are essential for displaying variable values in output statements in Java.

A

Placeholder

56
Q

refers to the degree of dependency between software components.

57
Q

optional, and used for class organizations.

A

Package Declarations

58
Q

Errors in Java

A

Compile-time Errors, Runtime Errors, Logical Errors

59
Q

also known as type conversion is the process of converting a value from one data type to another, allowing you to modify the interpretation of a value.

A

Typecasting

60
Q

Syntax Rules in Java

A

Case Sensitive, Class names start with uppercase, method names start with lowercase, file name = class name

61
Q

Newline and Tab Escape sequence

62
Q

the user-defined data types acting as the blueprint for individual objects, attributes, and methods.