Revision Notes Flashcards

1
Q

What is a function?

A

Functions in Java are blocks of code that perform a specific task, and they are used to organize code and make it more modular and reusable.

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

What is a method in Java?

A

A method in Java is a block of code that, when called, performs specific actions mentioned in it.

You can insert values or parameters into methods, and they will only be executed when called.

For instance, if you have written instructions to draw a circle in the method, it will do that task.

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

What is a variable in Java?

A

In Java, Variables are the data containers that save the data values during Java program execution.

Every Variable in Java is assigned a data type that designates the type and quantity of value it can hold. A variable is a memory location name for the data.

In Java, there are different types of variables, for example:

String - stores text, such as “Hello”. String values are surrounded by double quotes
int - stores integers (whole numbers), without decimals, such as 123 or -123
float - stores floating point numbers, with decimals, such as 19.99 or -19.99
char - stores single characters, such as ‘a’ or ‘B’. Char values are surrounded by single quotes
boolean - stores values with two states: true or false

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

What is a constant in Java?

A

In Java, a constant is a variable whose value cannot be changed once it’s assigned.

Constants are often used to represent values that will not change, such as the number of students in a class.

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

What is indentation?

A

In programming, indentation is just like formatting. It is used to make the code readable to other users because it makes the code easier to edit, displays how the braces match up, and shows the logic of the program in well-organized fashion

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

What is a Class?

A

In Java, a class is a blueprint or template for creating objects. It defines the attributes (fields) and behaviors (methods) that objects of that class will have. Classes are the fundamental building blocks of object-oriented programming in Java.

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

What is an object?

A

An object in Java is a basic unit of Object-Oriented Programming and represents real-life entities.

Objects are the instances of a class that are created to use the attributes and methods of a class. A typical Java program creates many objects, which interact by invoking methods.

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

What is an Argument?

A

A data item specified in a method call. An argument can be a literal value, a variable, or an expression.

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

What is an Array?

A

A collection of data items, all of the same type, in which each item’s position is uniquely designated by an integer.

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

What is a comment?

A

Explanatory text that is ignored by the compiler. In programs written in the Java(TM) programming language, comments are delimited using // or //.

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

What is a parameter?

A

A parameter is essentially a variable of a given type (String, int, Boolean etc) when you call the method/function, you must pass an a value to this variable.

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

What is white box testing?

A

In white box testing, the tester has knowledge of the internal workings of the item being tested. They use this information to select test cases that cover the complete scope of the program, including branches, loops, and specific lines of code.

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

What is black box testing?

A

Black box testing is a software testing technique where the internal workings or implementation details of the software being tested are not known to the tester. Instead, the tester focuses solely on the inputs and outputs of the software, treating it as a “black box” with no visibility into its internal structure, algorithms, or code.

In black box testing, the tester designs test cases based on the specifications, requirements, or functional behavior of the software. These test cases are then executed against the software, and the results are compared against expected outcomes to identify defects, errors, or deviations from the desired behavior.

Black box testing is useful for assessing the functionality, usability, and reliability of the software from an end-user perspective. It helps uncover issues related to incorrect or unexpected behavior, boundary conditions, error handling, and interoperability without requiring knowledge of the software’s internal logic or implementation details.

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

What is a syntax error?

A

A syntax error in programming is a mistake in the code that violates the rules of the programming language. It’s like a grammatical error in writing.

For example, if you forget a semicolon at the end of a statement or misspell a keyword, the program won’t understand what to do. These errors need to be fixed before the program can run correctly

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

What is a logic error?

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