English Русский Contacts Site map Add to favorites
Registration
Login
Master braindump list
New braindumps
Submit a dump
Get latest dump
braindumps.com.ua
flame
3COM (7)
Adobe (1)
BEA (1)
Checkpoint (22)
Cisco (20)
Citrix (21)
CIW (15)
Compaq (0)
CompTIA (51)
CWNA (2)
EMC (2)
Exin (4)
GEJOS (4)
HDI (1)
HP (4)
IBM (13)
Juniper (5)
Linux Prof Institute (LPI) (2)
Lotus (11)
Microsoft (2462)
Network Appliance (2)
Novell (16)
Oracle (423)
PLSQL (1)
PMI (5)
SAS (1)
Sun (87)
Teradata (4)
Login:
Password:
RSS feed

Contacts
Certification links
Links
Authorized user can see question and answers.
Please log in or sign up.

Exam question list:
Show all comments
Sun 310-019: Sun Certified Associate for the Java Platform, Standard Edition
#101. Given:
  1. 1. class Test {
  2. 2. public static void main(String args[]) {
  3. 3. int num1 = 10, num2 = 20, result;
  4. 4. result = calc(num1, num2);
  5. 5. System.out.println(result);
  6. 6. }
  7. 7.
  8. 8. // insert code here
  9. 9. }
Which, inserted at line 8, produces the output 30?

Show comments for this question (0)
Add comments
Link to this question

#102. Given:
  1. 1. public class Foo {
  2. 2. int size;
  3. 3. public static void main(String[] args) {
  4. 4. Foo f = new Foo();
  5. 5. f.setSize(5);
  6. 6. Foo g = f.go(f);
  7. 7. System.out.print(f.size + " : " + g.size);
  8. 8. }
  9. 9. void setSize(int s) {
  10. 10. size = s;
  11. 11. }
  12. 12. public Foo go(Foo g) {
  13. 13. g.setSize(2);
  14. 14. return g;
  15. 15. }
  16. 16. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#103. Given:
  1. 1. public class Bar {
  2. 2. int size;
  3. 3. public static void main(String[] args) {
  4. 4. Bar b = new Bar();
  5. 5. b.size = 27;
  6. 6. int i = b.go(b.size);
  7. 7. System.out.print(b.size + " : " + i);
  8. 8. }
  9. 9. public int go(int size) {
  10. 10. size++;
  11. 11. return size;
  12. 12. }
  13. 13. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#104. Given:
  1. 1. class Test2 {
  2. 2. static String setMessage(String str) {
  3. 3. return str + "How are you doing?";
  4. 4. }
  5. 5.
  6. 6. public static void main(String[] args) {
  7. 7. String str = "Hello! ";
  8. 8. str = setMessage(str);
  9. 9. System.out.println("str : " + str);
  10. 10. }
  11. 11. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#105. Given:
  1. 4. int n1 = 22, n2 = 67, n3 = 0, n4 = 47, n5 = 17, n6 = 50;
  2. 5. boolean b = true;
Which three evaluate to true? (Choose three.)

Show comments for this question (0)
Add comments
Link to this question

#106. Given:
  1. 1. class Test {
  2. 2. public static void main(String[] args) {
  3. 3. int num = 1;
  4. 4. for (num = 0; num < 3; ++num ) {
  5. 5. num *= 2;
  6. 6. }
  7. 7. System.out.println("num = " + (num++));
  8. 8. }
  9. 9. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#107. Given:
  1. 14. class Dog {
  2. 15. String name;
  3. 16. public static void main(String [] args) {
  4. 17. Dog d1 = new Dog();
  5. 18. Dog d2 = new Dog();
  6. 19. d1.name = "Aiko";
  7. 20. d2.name = "Aiko";
  8. 21. if (d1 == d2) System.out.print("== ");
  9. 22. if (d1.equals(d2)) System.out.println("dot =");
  10. 23. }
  11. 24. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#108. Given:
  1. 1. class Test {
  2. 2. public static void main(String args[]) {
  3. 3. String str = new String("Welcome");
  4. 4. // insert code here
  5. 5. }
  6. 6. }
Which, inserted at line 4, produces the output true?

Show comments for this question (0)
Add comments
Link to this question

#109. Given:
  1. 12. String s = "abcdefgabc";
  2. 13. char c = s.charAt(2);
  3. 14.
  4. 15. if (c == 'c')
  5. 16. s = s.replace('c', 'X');
  6. 17. else if (c == 'b')
  7. 18. s = s.replace('b', 'O');
  8. 19. else
  9. 20. s = s.replace('c', 'O');
  10. 21. System.out.println(s);
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#110. Given:
  1. 1. class Test {
  2. 2. public static void main(String[] args) {
  3. 3. String str = "Hello";
  4. 4. str = str.replace("Bye");
  5. 5. System.out.println("str : " + str);
  6. 6. }
  7. 7. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question


  [1] ...  [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] ... [21]
Up ^ gen. 0.428 Server date 06:45 10-01-2009 Developed by Zip © 2006 Up ^
Forum
Start online exam simulation
Master braindump