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-056: Sun Certified Programmer for J2SE 5.0 Upgrade Exam
#91. Given:
  1. 11. Float pi = new Float(3.14f)
  2. 12. if(pi> 3) {
  3. 13. System.out.print(”pi is bigger than 3.”);
  4. 14. }
  5. 15. else {
  6. 16. System.out.print(”pi is not bigger than 3.”);
  7. 17. }
  8. 18. finally {
  9. 19. System.out.println(“Have a nice day.”);
  10. 20. }
What is the result?

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

#92. Given:
  1. 11. static class A {
  2. 12. void process() throws Exception (throw new Exception(); }
  3. 13. }
  4. 14. static class B extends A {
  5. 15. void process() { System.out.println(”B”); }
  6. 16. }
  7. 17. public static void main(String[] args) {
  8. 16. new B().process();
  9. 19.}
What is the result?

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

#93. Given:
  1. 10. public class Foo {
  2. 11. static int[] a;
  3. 12. static { a[0]=2; }
  4. 13. public static void main( String[] args ) {}
  5. 14. }
Which exception or error will be thrown when a programmer attempts to run this code?

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

#94. Given:
  1. 11. public static void main(String[] args) {
  2. 12. String str = “null”;
  3. 13. if(str == null) {
  4. 14. System.out.println(null);
  5. 15. } else (str.length() == 0)
  6. 16. System.out.println(”zero”);
  7. 17. } else {
  8. 18. System.out.println(”some”);
  9. 19. }
  10. 20. }
What is the result?

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

#95. Given:
  1. 11. public static lterator reverse(List list) {
  2. 12. Collections,reverse(list);
  3. 13. return list.iterator();
  4. 14. }
  5. 15. public static void main(String[] args) {
  6. 16. List list = new ArrayList();
  7. 17. list.add(1); list.add(2); list.add(3);
  8. 18. for (Object obj: reverse(list))
  9. 19. System.out.print(obj + 0, “ , “);
  10. 20. }
What is the result?

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

#96. A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where the old one is installed. Bob is currently able to run a Java chess program starting from his home directory/home/bob using the command:
java -classpath /test:/home/bob/downloads/*.jar games.Chess
Bob’s CLASSPATH is set (at login time) to:
/usr/lib:/home/bob/classes:/opt/java/lib:/opava/lib/*.jar
What is a possible location for the Chess.class file?

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

#97. Given:
  1. 1. interface DoStufl’2 {
  2. 2. float getRange(int low, mt high); }
  3. 3.
  4. 4. interface DoMore {
  5. 5. float getAvg(int a, int b, int c); }
  6. 6.
  7. 7. abstract class DoAbstract implements DoStuff2, DoMore { }
  8. 8.
  9. 9. class DoStuff implements DoStuff2 {
  10. 10. public float getRange(int x, int y) { return 3.14f; } }
  11. 11.
  12. 12. interface DoAII extends DoMore {
  13. 13. float getAvg(int a, int b, int c, int d); }
What is the result?

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

#98. Given classes defined in two different files:
  1. 1. package util;
  2. 2. public class BitUtils {
  3. 3. public static void process(byte[]) { /* more code here */ }
  4. 4. }
  5. 1. package app;
  6. 2. public class SomeApp {
  7. 3. public static void main(String[] args) {
  8. 4. byte[] bytes = new byte[256];
  9. 5. // insert code here
  10. 6. }
  11. 7. }
What is required at line 5 in class SomeApp to use the process method of BitUtils?

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

#99. Given:
  1. 1. package com.company.application;
  2. 2.
  3. 3. public class MainClass
  4. 4. public static void main(String[] args) {}
  5. 5
And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATH environment variable is set to “.“ (current directory). Which two java commands entered at the command line will run MainClass? (Choose two.)

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

#100. Given:
  1. 10. public class SuperCalc {
  2. 11. protected static mt multiply(int a, mt b) { return a * b;}
  3. 12. }
and:
  1. 20. public class SubCalc extends SuperCalc{
  2. 21. public static int multiply(int a, int b) {
  3. 22. int c = super.multiply(a, b);
  4. 23. return c;
  5. 24. }
  6. 25. }
and:
  1. 30. SubCalc sc = new SubCalc ();
  2. 31. System.out.println(sc.multiply(3,4));
  3. 32. System.out.println(SubCalc.multiply(2,2));
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] ... [12 
Up ^ gen. 0.334 Server date 05:32 10-01-2009 Developed by Zip © 2006 Up ^
Forum
Start online exam simulation
Master braindump