Final! Flashcards

(60 cards)

1
Q

What is Java classified as?

A

A high-level language

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

What is machine language composed of?

A

1’s and 0’s

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

What is the job of a compiler?

A

To translate high-level language to machine language

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

What does IDE stand for?

A

Integrated Development Environment

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

What does an IDE include?

A
  • An editor
  • A compiler
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a variable?

A

A named location in the computer’s RAM

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

What is assignment in programming?

A

The operation of putting a value in a variable

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

What is the size of a byte?

A

8 bits

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

What is a bit?

A

A single one or zero

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

What does I/O stand for?

A

Input/Output

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

What is an example of an output in Java?

A

System.out

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

What is the purpose of the Scanner class?

A

To read input from various sources

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

What type of statements are comments in programming?

A

Read only by the programmers

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

What is the difference between an integer and a floating point?

A

Integer is a whole number, while floating point represents decimal numbers

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

What are the two types of conversion in programming?

A
  • Implicit conversion
  • Explicit conversion (casting)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What do arithmetic operations in programming involve?

A
  • / % + -
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is branching in control structures?

A

Using if statements, if/else statements, and switch statements

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

What does a switch statement do?

A

Works only for exact matching and is good for menus (substitute for a bunch of if..else)

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

What is a while loop?

A

A loop that includes initialization, condition & update

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

What is the structure of a for loop?

A

for (int i = 0; i < 5; i++){ }

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

What are the six relational operators?

A

> , >=, <, <=, ==, !=

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

What are the Boolean operators?

A
  • && (and)
  • || (or)
  • ! (not)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What are common uses of loops?

A
  • Go-again loop
  • Finding a sum loop
  • Sentinel loop
  • Searching for a value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are methods in programming?

A

Functions that perform operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the return type/value in methods?
Indicates what the method will return, e.g., void
26
What are parameters in methods?
The things that provide a value to be analyzed
27
What is the difference between call and definition?
Call is invoking a method; definition is creating it (public static void Main(){})
28
How are characters represented in programming?
Single quotes for single characters
29
What are char methods?
* Toupper * tolower * Ispunc * isalpha
30
What is a string?
An ordered group of characters
31
How are string values denoted?
Double quotes for values
32
What are string variables considered in Java?
Objects
33
What are some common string methods?
* charAt() * indexOf() * substring() * equals() * equalsIgnoreCase() * string concatenation (concat and +=)
34
What is the syntax to declare an array?
Datatype[] arrayName = new Datatype[size]
35
What are elements in an array?
The items stored in the array
36
What are indices in an array?
The location of each item [0,0]
37
What does a selection sort involve?
* Inner loop finds the location of smallest/largest item * Outer loop puts each item in its position
38
How do you make a copy of an array?
By iterating through the elements and assigning them to a new array
39
What does an object consist of?
Fields and methods
40
What is a class in programming?
The datatype of an object
41
What are reference variables?
stores memory/address of an object
42
What is dynamic memory allocation?
assigning space during runtime (new)
43
What are constructors?
Special methods that are called when an object is created
44
What are the two types of constructors?
* Default constructor * Overloaded constructors
45
What is FileInputStream used for?
To read data from a file
46
What is the purpose of the try-catch block?
To handle exceptions
47
What does FileOutputStream do?
To write data to a file
48
What is the role of JFrame in GUI?
To create a window for the graphical user interface
49
What are GridBagConstraints used for?
To control the layout of components in a GUI
50
What does the JLabel component do?
Displays text in a GUI
51
What is the function of ActionListener in GUI?
To handle action events from components like buttons
52
What does inheritance in programming allow?
A child class to inherit attributes and methods from a parent class
53
What is method overriding?
The ability of a subclass to provide a specific implementation of a method already defined in its superclass
54
What is polymorphism?
Allows objects of different classes to be treated as objects of a common superclass
55
What is UML?
Unified Modeling Language
56
What does UML represent?
A blueprint of object-oriented programming
57
How are classes represented in UML?
As a rectangle with three parts: Name, Attributes (fields), Methods
58
Types of Control Structures
Branching (if...else, switch) Loops (While, for)
59
What is a sentinel loop?
Prevents the program from running forever or for too long
60