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
 
Catherine Guerin
 
 

 

Braindumps of 310-035

Sun Certified Programmer for Java 2 Platform 1.4

 

Exam Questions, Answers, Braindumps (310-035)

Passed the exam yesterday. All the questions were from exams.ws study material. I got 96 % marks. That’s sufficient for me. I am satisfied with it.

Q.1 Which statement is true?

A. A try statement must have at least one corresponding catch block.

B. Multiple catch statements can catch the same class of exception more than once.

C. An Error that might be thrown in a method must be declared as thrown by thatmethod, or be handled within that method.

D. Except in case of VM shutdown, if a try block starts to execute, a corresponding finally block will always start to execute.

E .Except in case of VM shutdown, if a try block starts to execute, a corresponding finally block must always run to completion.

Answer: E

Q.2 Given:

1. public class Test {

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

3. int x = 0;

4. assert (x > 0): “assertion failed”;

5. System.out.println(“finished”);

6. }

7. }

What is the result?

A. finished

B. Compilation fails.

C. An AssertionError is thrown.

D. An AssertionError is thrown and finished is output.

Answer: A

Q.3 Given:

1. public class Test {

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

3. int x = 0;

4. assert (x > 0) ? “assertion failed” : “assertion passed”;

5. System.out.println(“Finished”);

6. }

7. }

What is the result?

A. finished

B. Compilation fails.

C. An AssertionError is thrown and finished is output.

D. An AssertionError is thrown with the message “assertion failed”.

E. An AssertionError is thrown with the message “assertion passed”..-30 -

Answer: B

Q.4 Given:

1. public class ReturnIt {

2. return Type methodA(byte x, double y) {

3. return (long)x / y * 2;

4. }

5. }

What is the narrowest valid returnType for methodA in line2?

A. int

B. byte

C. long

D. short

E. float

F. double

Answer: F

Q.5 Given:

1. interface Beta {}

2.

3. class Alpha implements Beta {

4. String testIt() {

5. return “Tested”;

6. }

7. }

8.

9. public class Main1 {

10. static Beta getIt() {

11. return new Alpha();

12. }

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

14. Beta b = getIt();

15. System.out.println( b.testIt() );

16. }

17. }

What is the result?

A. Tested

B. Compilation fails.

C. The code runs with no output.

D. An exception is thrown at runtime.

Answer: B

Q.6 Given:

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

12. Integer a = new Integer(10);

13. Integer b = new Integer(10);

14. Integer c = a;

15. int d = 10;

16. double e = 10.0;

17. }

Which three evaluate to true ? (Choose three)

A. (a == c)

B. (d == e)

C. (b == d)

D. (a == b)

E. (b == c)

F. (d == 10.0)

Answer: A, B, F

Q.7 Which method is an appropriate way to determine the cosine of 42 degrees?

A. Double d = Math.cos(42);

B. Double d = Math.cosine(42);

C. Double d = Math.cos(Math.toRadians(42));

D. Double d = Math.cos(Math.toDegrees(42));

E. Double d = Math.cosine(Math.toRadians(42));

Answer: C

Q.8 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

Q.9 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

Q.10 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?

A. Compilation will fail.

B. Compilation succeeds and no exceptions are thrown.

C. Compilation succeeds but an exception is thrown at line 5 in ClassTest.java.

D. Compilation succeeds but an exception is thrown at line 6 in ClassTest.java.

Answer: B

310-035

 

 

 

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