Find a Language Amigo
Guaranteed to help you learn a new language without years of studying.
![]() |
![]() |
|
Java Programming : Language Basics : True or False
| Answer the following questions about basics of the Java programming language. These include concepts like operators, variables, declarations, basic language structures such as if, for, switch, etc. |
1. The modulus operator (%) in Java can be used only with variables of integer type. Ο True
Ο False
2. Declarations must appear at the start of the body of a Java method. Ο True
Ο False
3. All bitwise operations are carried out with the same level of precedence in Java. Ο True
Ο False
4. The operations y >> 3 and y >>> 3 produce the same result when y > 0. Ο True Ο False
5. consider the statement "x = (a > b) ? a : b"; then the value of x is 27, if a = 18 and b = 27. Ο True Ο False
6. Whenever the "&&" operator is used, such as in: exp1 && exp2 where exp1 and exp2 are boolean expressions, both the boolean expressions are not always evaluated. Ο True Ο False
7. The expression (y >= z && a == b) is evaluated by first evaluating the expression y >= z, and then evaluating a == b. Ο True
Ο False
8. The "switch" selection structure must end with the default case. Ο True
Ο False
9. For the expression (y >= z && a == b) to be true, at least one of (y >= z) and (a == b) must be true. Ο True
Ο False
10. A break statement must always be present in the default case of a "switch" selection structure. Ο True
Ο False
11. Variables declared inside a for loop are limited in scope to the loop. Ο True
Ο False
12. An array in the Java programming language has the ability to store many different types of values. Ο True
Ο False
13. An individual array element from an array of type int, when passed to a method is passed by value. Ο True Ο False
14. Objects of a super class can always be assigned to a subclass reference. Ο True
Ο False
15. Objects of a subclass can be assigned to a super class reference. Ο True Ο False
16. The == operator can be used to compare two String objects. The result is always true if the two strings are identical. Ο True
Ο False
Related Keywords :-
java programming language , javascript programming , java applets sample , java applets examples , java , java dynamic arrays , javascript arrays , arraylist , java api , flash , java operations , java methods , java game programming , javascript array length , javascript multidimensional arrays , javascript array functions
|
|
Syvum in other languages: French, Spanish, Portuguese
|