programming languages Online Quiz - 296
Description: programming languages Online Quiz - 296 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
Given: 11. public abstract class Shape { 12. int x; 13. int y; 14. public abstract void draw(); 15. public void setAnchor(int x, int y) { 16. this.x = x; 17. this.y = y; 18. } 19. } and a class Circle that extends and fully implements the Shape class. Which is correct?
public class xyz { public static void main(String args[]) { for(int i = 0; i < 2; i++) { for(int j = 2; j>= 0; j--) { if(i == j) break; System.out.println("i=" + i + " j="+j); } } } } A) i=0 j=0 B) i=0 j=1 C) i=0 j=2 D) i=1 j=0 E) i=1 j=1 F) i=1 j=2 G) i=2 j=0 H) i=2 j=1 I) i=2 j=2
What is the result of evaluating the expression 14 ^ 23. Select the one correct answer. A) 25 B) 37 C) 6 D) 31 E) 17 F) 9 G) 24
Is the following statement true or false. As the toString method is defined in the Object class, System.out.println can be used to print any object.
In which all cases does an exception gets generated. Select the two correct answers. int i = 0, j = 1;
What would be the output of the following program? main() { static int a[20]; int i =0 ; a[i]=i++; printf("\n%d %d %d",a[0],a[1],i); }
The maximum combined length of the command line arguments including the spaces between adjacent arguments is