Oop Reviewer
Oop Reviewer
VARIABLE DECREMENT
The name of the data and its value is decreases the current value by 1
referred to as Ex. A--
Ex. A - 1
CHAR
Characters SCANNER VARIABLES
Ex. Char example = E; nextInt()
nextFloat()
BOOLEAN nextDouble()
True or False nextShort()
Ex. Boolean example = true; nextLong()
next().charAt(0)
INT nextBoolean()
Whole numbers nextLine()
Ex. Int example = 25;
ASCII CODES:
SHORT 65 to 90 = A to Z
Smaller than int 97 to 122 = a to z
Ex. Short example = 25;
IF STATEMENT
Executes the code only if the condition !
specified is met not
CONDITION ARRAY
Which behaves similarly with how the Is a collection of entities with similar types
condition in the while loop behaves Ex. Int example[];
Ex. “ctr <- up_bound; ” Ex. Int[] example;
< ARRAYCOPY
Is less than A method available in the system class that
can be used to copy data from one array to
>= another efficiently
Is greater than or equal to
LENGTH
<= To establish the number of position in the
Is less than or equal to array
LOGICAL OPERATORS
&&
And
||
Or
==
Has a value of
POSSIBLE TRUE OR FALSE QUESTIONS 16. !(!(!(!(!(TRUE && FALSE)))))
1. Java is a case-insensitive language = TRUE
= TRUE
CHARCATER 17. !(!(FALSE || TRUE) && (TRUE && TRUE))
2. A String literal must be enclosed in single = TRUE
quotes (')
= FALSE 18. Java is short for JavaScript
= FALSE
3. The ++ operator increments a variable by 1
before evaluation 19. In java, its possible to inherit attributes and
= FALSE methods from one class to another
= TRUE
4. Java allows multiple inheritance of classes similar
= FALSE 20. Array is a collection of entities of different
types
5. The && operator (and) returns true only if = FALSE
both operands are true
= TRUE 21. testExpr = ((8 + 4 == 4 + 8));
= TRUE
6. For an OR operator to return true, only one
input/operands should be true 22. testExpr = ((39/3 == 13) && (56 % 6 == 0) ||
= FALSE ((2 + 8) == (8 + 2)));
= TRUE
7. Java supports break and continue statements
within nested loops 23. methodName() is the right way to create a
= TRUE method in Java
= TRUE
8. The first element in an array is 1
= FALSE