|
|
Authorized user can see question and answers. Please log in or sign up. 
|
#62. Exhibit: 1. public class Mycircle { 2. public double radius; 3. public double diameter; 4. 5. public void setRadius(double radius) 6. this.radius = radius; 7. this.diameter= radius * 2; 8. } 9. 10. public double getRadius() { 11. return radius; 12. } 13. }
Which statement is true?
Show comments for this question (0)
Add comments
Link to this question
|
|
#64. Exhibit: ClassOne.java 1. package com.abc.pkg1; 2. public class ClassOne { 3. private char var = ‘a’; 4. char getVar() {return var;} 5. } ClassTest.java 1. package com.abc.pkg2; 2. import com.abc.pkg1.ClassOne; 3. public class ClassTest extends ClassOne { 4. public static void main (String[]args ) { 5. char a = new ClassOne().getVar(); 6. char b = new ClassTest().getVar(); 7. } 8. }
What is the result?
Show comments for this question (0)
Add comments
Link to this question
|
|
#67. Exhibit: 1. class super { 2. public int getLength() {return 4;} 3. } 4. 5. public class Sub extends Super { 6. public long getLength() {return 5;} 7. 8. public static void main (String[]args ) { 9. super sooper = new Super (); 10. Sub sub = new Sub(); 12. sooper.getLength()+ “,” + sub.getLength() }; 13. } 14. }
What is the output?
Show comments for this question (0)
Add comments
Link to this question
|
|
#68. Exhibit 1. public class SyncTest{ 2. public static void main (String[] args ) { 6. public void run() { 7. synchronized(s1) { 8. s2.append(“A”); 9. synchronized(s2) { 10. s2.append(“B”); 13. } 14. } 15. } 16. }.start(); 18. public void run() { 19. synchronized(s2) { 20. s2.append(“C”); 21. synchronized(s1) { 22. s1.append(“D”); 25. } 26. } 27. } 28. }.start(); 29. } 30. }
Which two statements are true? (Choose Two)
Show comments for this question (0)
Add comments
Link to this question
|
|
|
|
gen. 0.203
|
Server date 05:53 10-01-2009
|
Developed by Zip © 2006
|
|
 |
|
|