REAL QUESTIONS SUBMIT MATERIAL ADVERTISE
Braindumps

Microsoft

Cisco

Citrix

CIW

CompTia

CWNA

Apple

Adobe

HP

Legato

Exin

Filemaker

Brocade

Ericsson

TIA

Veritas

ISEB

SCP

IISFA

ISM

OMG

Apc

Mile2

Foundry

Huawei

McData

Symantec

TeraData

RedHat

Solar Winds

Blue Coat

Riverbed

 

 
 
Click on name of dumper to view the dump
 
Adiya Johnson
 
 

 

Braindumps of 310-025

Sun Certified Programmers for the Java 2 Platform (SCJP 2)

Exam Questions, Answers, Braindumps (310-025)

Hi, I would like to thank www.braindumps.org for providing help in such a manner. It was really of great help.

1. Given:

1. public class test (

2. public static void main (String args[]) {

3. int i = 0xFFFFFFF1;

4. int j = ~i;

5.

6. }

7. )

What is the decimal value of j at line 5?

A. 0

B. 1

C. 14

D. –15

E. An error at line 3 causes compilation to fail.

F. An error at line 4 causes compilation to fail.

Answer: C

2. Given:

1. public class MethodOver {

2. public void setVar (int a, int b, float c) {

3. }

4. }

Which two overload the setVar method? (Choose Two)

A. private void setVar (int a, float c, int b) { }

B. protected void setVar (int a, int b, float c) { }

C. public int setVar (int a, float c, int b) (return a;)

D. public int setVar (int a, int b, float c) (return a;)

E. protected float setVar (int a, int b, float c) (return c;)

Answer: A, C

3. Which three are valid declarations of a float? (Choose Three)

A. float foo = -1;

B. float foo = 1.0;

C. float foo = 42e1;

D. float foo = 2.02f;

E. float foo = 3.03d;

F. float foo = 0x0123;

Answer: A, D, F

4. Given:

1. class super {

2. public float getNum() {return 3.0f;}

3. )

4.

5. public class Sub extends Super {

6.

7. )

Which method, placed at line 6, will cause a compiler error?

A. public float getNum() {return 4.0f; }

B. public void getNum () { }

C. public void getNum (double d) { }

D. public double getNum (float d) {retrun 4.0f; }

Answer: B

5. Which of the following gets the name of the parent directory file “file.txt”?

A. String name= File.getParentName(“file.txt”);

B. String name= (new File(“file.txt”)).getParent();

C. String name = (new File(“file.txt”)).getParentName();

D. String name= (new File(“file.txt”)).getParentFile();

E. Directory dir=(new File (“file.txt”)).getParentDir();

String name= dir.getName();

Answer: B

6. Which statement is true for the class java.util.HashSet?

A. The elements in the collection are ordered.

B. The collection is guaranteed to be immutable.

C. The elements in the collection are guaranteed to be unique.

D. The elements in the collection are accessed using a unique key.

E. The elements in the collections are guaranteed to be synchronized.

Answer: C

7. Given:

1. switch (i) {

2. default:

3. System.out.printIn(“Hello”);

4. )

What are the two acceptable types for the variable i? (Choose Two)

A. char

B. byte

C. float

D. double

E. object

Answer: A, B

8. Which two CANNOT directly cause a thread to stop executing? (Choose Two)

A. Existing from a synchronized block

B. Calling the wait method on an object

C. Calling notify method on an object

D. Calling read method on an InputStream object

E. Calling the SetPriority method on a Thread object

Answer: A, C

9. Given an ActionEvent, which method allows you to identify the affected Component?

A. public class getClass()

B. public Object getSource()

C. public Component getSource()

D. public Component getTarget()

E. public Component getComponent()

F. public Component getTargetComponent()

Answer: B

10. Which statement about static inner classes is true?

A. An anonymous class can be declared as static.

B. A static inner class cannot be a static member of the outer class

C. A static inner class does not require an instance of the enclosing class.

D. Instance members of a static inner class can be referenced using the class name of the static inner class.

Answer: C

11. Which two statements are true regarding the creation of a default constructor? (Choose Two)

A. The default constructor initializes method variables.

B. The compiler always creates a default constructor for every class.

C. The default constructor invokes the no-parameter constructor of the superclass.

D. The default constructor initializes the instance variables declared in the class.

E. When a class has only constructors with parameters, the compiler does not create a default constructor.

Answer: D, E

310-025

 

 

 

Braindumps Real exam questions and verified answers - 100% passing guarantee - cheap prices.

 

Braindumps and Exams - Instant download real exam questions - Passing guarantee.

Follow us on FaceBook
Braindumps on Facebook
 
 
 
 
 

CheckPoint

Linux

Novell

DB/2

Network Appliance

EC-Council

Nortel

McAfee

Juniper

ISACA

PMI

Sybase

EMC

HDI

SNIA

ISC

Sair

IBM

Lotus

Exam Express

3COM

BICSI

DeLL

Enterasys

Extreme Networks

Guidance Software

Computer Associates

Network General

SAS Institute

Alcatel Lucent

SeeBeyond

TruSecure

Polycom

Hyperion

Hitachi

Nokia

Fortinet

Vmware

Fujitsu

Tibco

Intel

PostgreSQLCE

BusinessObjects

RESSoftware

BlackBerry

AccessData

ICDL

Isilon

SAP

The Open Group

ACSM

Altiris

Avaya

Cognos

F5

Genesys

SDI

ACI

ASQ

Google

H3C

HIPAA

HRCI

SOA

IIBA

Zend