The two secure class variable types
What is private and protected?
Maximum value of an INT
What is 2,147,483,647?
What is 2^31 -1?
To make decisions in the code based on certain conditions.
What is the purpose of a selection statement in programming?
This statement checks a condition and runs a block of code assuming the condition is true.
What is an if statement?
This type of loop is ideal for executing code a specific number of times, often using a counter.
What is a for loop?
Syntax of inheritance
What is subclass extends superclass?
Data type that represents one bit of information
What is a boolean?
Give an example of a simple "if" statement in a programming language.
What is "if (condition) { // code block }"?
This statement is used when the if condition is false and you want to run a different block of code.
What is an else statement?
This loop keeps running as long as its condition is true and is typically used when the number of iterations is not known in advance.
What is a while loop?
Value which stays the same across all instances of a class
What is a static field?
Numerical data type that should never be used for currency
What is a Double?
Explain the difference between "if-else" and "if-else if-else" statements in programming.
What is "if-else" allows for two possible outcomes, while "if-else if-else" allows for multiple conditions with corresponding outcomes?
This term refers to placing an 'if' or 'else' statement inside another 'if' or 'else' block.
What is nesting?
This loop is similar to a while loop but ensures that the code block is executed at least once.
What is a do-while loop?
You can access static methods and variables without a ______
What is a class instance?
Largest primitive data type by bit
What is a long?
How can a nested selection statement be used in programming, and why might it be necessary?
What is a selection statement (such as "if" or "switch") placed inside another selection statement, often used to handle more complex decision-making scenarios? It is necessary when there are multiple conditions that need to be evaluated in a hierarchical manner.
This coding syntax is necessary in many languages to define the start and end of a code block under 'if' or 'else'.
What are curly braces {}?
In a for loop, this statement can change each time the code block in the loop has been executed.
What is the increment or update statement?
Most used static method in Java
What is a main method?
It is orignally set false
What is default value?
Explain the importance of incorporating selection statements in a program's logic, providing real-world examples where such constructs are crucial.
What is the significance of selection statements in programming for handling different scenarios and making decisions based on varying conditions?
This statement is used to check multiple conditions one by one, after an if statement and before an else.
What is else if?
This keyword, when placed inside a loop, terminates the loop immediately and transfers control to the next statement following the loop.
What is break?