View Single Post
Old 04-04-06, 03:06 PM   #10 (permalink)
amitshresth
Member
 
Join Date: Mar 2006
Location: India
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 3 amitshresth has disabled reputation


hello,


keerthi sir,


as you privide answers of asked questions has no serial no.as questions are and more then the questions asked.it has done by knowingly or some reason.and no explanation of answers.


as given below:


Find the o/p of the following


Q. 1


Which of the following return true?
  1. "john" == "john"
  2. "john".equals("john")
  3. "john" = "john"
  4. "john".equals(new Button("john"))


Select all correct answers.





Q. 2


Which of the following do not lead to a runtime error?
  1. "john" + " was " + " here"
  2. "john" + 3
  3. 3 + 5
  4. 5 + 5.5


Select all correct answers.





Q. 3


Which of the following are so called "short circuit" logical operators?
  1. &
  2. ||
  3. &&
  4. |


Select all correct answers.





Q. 4


Which of the following are acceptable?
  1. Object o = new Button("A");
  2. Boolean flag = true;
  3. Panel p = new Frame();
  4. Frame f = new Panel();
  5. Panel p = new Applet();


Select all correct answers.





Q. 5


What is the result of compiling and running the following code:





public class Test {


static int total = 10;


public static void main (String args []) {


new Test();


}


public Test () {


System.out.println("In test");


System.out.println(this);


int temp = this.total;


if (temp > 5) {


System.out.println(temp);


}


}


}


  1. The class will not compile
  2. The compiler reports and error at line 2
  3. The compiler reports an error at line 9
  4. The value 10 is one of the elements printed to the standard output
  5. The class compiles but generates a runtime error





Select all correct answers.





Q 6


Which of the following is correct:
  1. String temp [] = new String {"j" "a" "z"};
  2. String temp [] = { "j " " b" "c"};
  3. String temp = {"a", "b", "c"};
  4. String temp [] = {"a", "b", "c"};


Select the most appropriate answer.


Answers
13. A, B
14. A, B, C, D
15.B, C
16. A, E
17. D
18. D
19. A
__________________
_________________
sky is the limit
With Regards...!
amit kulshreshtha
amitshresth is offline   Reply With Quote