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
#91. Given:
  1. 3. int num = 0, count;
  2. 4. while ( num < 3 ) {
  3. 5. num++;
  4. 6. // insert code here
  5. 7. System.out.println("num = " + num + " : count = " + count);
  6. 8. }
  7. 9. }
Which, inserted at line 6, produces the following output?
  1. num = 1 : count = 1
  2. num = 1 : count = 2
  3. num = 2 : count = 1
  4. num = 2 : count = 2
  5. num = 3 : count = 1
  6. num = 3 : count = 2


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

#92. Given:
  1. 1. class Test {
  2. 2. public static void main(String args[]) {
  3. 3. String str = "Hello!";
  4. 4. String str2 = "Bye!";
  5. 5. str += str2;
  6. 6. str -= str2;
  7. 7.
  8. 8. if ( str == str2 ) {
  9. 9. System.out.println("str = str2");
  10. 10. } else {
  11. 11. System.out.println("str != str2");
  12. 12. }
  13. 13. }
  14. 14. }
What is the result?

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

#93. Given:
  1. 1. class Test {
  2. 2. public static void main(String args[]) {
  3. 3. int num;
  4. 4. num = 10;
  5. 5. calc(num);
  6. 6. System.out.println("num = " + num);
  7. 7. }
  8. 8.
  9. 9. static void calc(int num) {
  10. 10. num += 100;
  11. 11. }
  12. 12. }
What is the result?

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

#94. Given:
  1. 4. class Example {
  2. 5. int x = 50;
  3. 6. int y = 100;
  4. 7. public static void main(String args[]) {
  5. 8. int x = 0, y = 10;
  6. 9. Example ex = new Example();
  7. 10. while (x < 3) {
  8. 11. x++; y--;
  9. 12. }
  10. 13. System.out.println("x = " + x + " , y = " + y);
  11. 14. }
  12. 15. }
What is the result?

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

#95. You need to create a class Foo that will record the number of times the go() method is invoked on a particular instance of the class.
Which solution correctly implements this goal?

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

#96. You need to create a class that maintains a customer's account balance. The class must allow both credits (deposits) and debits (withdrawals) to the account. Which class correctly implements this functionality?

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

#97. You need an algorithm that must:
• Iterate through an array of primitive integers
• Print the value of each array element in index order
• If the value of the element is equal to 10, print the value of the element, and then terminate the iteration Which method correctly implements the algorithm?

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

#98. Given:
  1. 2. class Test {
  2. 3. public static void main(String args[]) {
  3. 4. for (int i = 1; i < 5; i++) {
  4. 5. if (i == 2) {
  5. 6. continue;
  6. 7. }
  7. 8. System.out.print(" i = " + i);
  8. 9. }
  9. 10. }
  10. 11. }
What is the result?

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

#99. You need an algorithm that must:
· Print the characters of a String, in index order
· Skip all instances of the character 'a' that appear in the String
Given:
  1. 2. public void foo (String s) {
  2. 3. // insert code here
  3. 4. }
Which two, inserted independently at line 3, correctly implement the algorithm? (Choose two.)

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

#100. Given:
  1. 1. class Test {
  2. 2. public static void main(String args[]) {
  3. 3. int i = 1;
  4. 4. while (i-- > 1) {
  5. 5. System.out.println("i : " + i);
  6. 6. }
  7. 7. }
  8. 8. }
What is the result?

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


 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] ... [21 
Up ^ gen. 0.255 Server date 05:57 10-01-2009 Developed by Zip © 2006 Up ^
Forum
Start online exam simulation
Master braindump