15 Questions
The sting method changes every occurrence of a given character and returns a new string
replace
These are control statements placed in another control statement used to control the flow of more complicated programs
Nested control structures
this structure of statements in a program execute a series of statements in order
sequential structure
which is the correct form of doa? while loop?
do {statements} while (condition);
which control structure executes a particular series of statements depending on a given condition?
Selection Structure
These are statements grouped together in curly braces
Compound Statements
This string method returns the index of the first occurrence of the specified string within a string
indexOf()
This repetition structure repeats the execution of a series of statements in a definite number of times
for loop
This is form by a set of characters and written in code enclosed in quotation marks
String
This refers to how a computer evaluates a logical expression from left to right then stops when the value of the condition is determined
Short-Circuit Evaluation
This method removes all the first and last white spaces in a string
trim()
which repetition of structure executes the loop body first before evaluating the expression
do...while loop
which string method returns the character in a string based on the specified index
charAt()
which statement is used to skip the remainder of the loop body and reevaluate the loop condition?
Continue Statement
Which is the correct form of an if statement?
if (condition ) {//statement}
Test your knowledge of control structures in programming with questions about the usage of control statements, loops, and grouped statements. Determine the correct form of do-while loop, understand how control structures execute a series of statements based on given conditions, and more.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free