Tag: programming languages
Questions Related to programming languages
-
- Classes in the same package
-
- All classes
-
- Only the class within the package that defined the method
-
- Classes that inherit access
-
- It jumps out of the loop back to the calling method.
-
- It jumps out of the loop to the next statement after the loop.
-
- It stops the execution of the program and of the virtual machine.
-
- It stops the innermost iteration and continues with the next iteration of the loop.
-
- Replace lines 7 to 14 with a break statement.
-
- Replace lines 7 to 14 with a continue statement.
-
- Replace line 12 with a continue statement.
-
- Insert a break statement between lines 16 and 17.
-
- char
-
- byte
-
- short
-
- int
-
- boolean
-
- From an int to a long
-
- From a byte to an int
-
- From a short to a byte
-
- From an int to a double
-
5) All of the above
-
1 public void myMethod(int x) {
-
2 private void myMethod(int x) {
-
3 switch(z) {
-
4 private void anotherMethod() {
-
1 int z = 0;
-
2 assert (z = 9);
-
3 assert (x ==5);
-
4 int z = 0;
-
5 boolean x = true;
-
- byte z;
-
- int z;
-
- char z
-
- None of these options are correct
-
- The program will run successfully with no errors or warnings.
-
- The program will halt with a runtime exception.
-
- The program will halt with a compiler error.
-
- The program will run successfully with no errors but a warning will be generated.
-
- 0000 0000 0000 0000 0000 0000 0000 0100
-
- 0000 0000 0000 0000 0000 0000 0000 1000
-
- 0000 0000 0000 0000 0000 0000 0001 0000
-
- 0000 0000 0000 0000 0000 0000 0000 0111
-
- 0000 0000 0000 0000 0000 0000 0000 1001