This page was exported from New Real Practice Test With VCE And PDF For Free Download
[
http://www.actualtest.info
]
Export date: Thu Mar 28 21:38:48 2024 / +0000 GMT
Info For 1Z0-803 Exam 100% Pass: PassLeader provides you with the newest 1Z0-803 169q exam questions updated in recent days to prepare your 1Z0-803 certification exams. Our best 1Z0-803 169q exam dumps will offer you the newest questions and answers with premium VCE and PDF format to download. And PassLeader also offer you the latest free version VCE Player! Vendor: Oracle QUESTION 46 A. Valid Answer: C QUESTION 47 A. 6 5 6 4 Answer: A QUESTION 48 A. int [] [] array 2D ={ { 0, 1, 2, 4} {5, 6}}; Answer: BD QUESTION 49 A. The Exception must be caught Answer: C QUESTION 50 A. 2 2 Answer: A QUESTION 51 A. public class Test implements SampleCloseable { Answer: ACE QUESTION 52 A. Change line 2 to the following: Answer: E http://www.passleader.com/1z0-803.html QUESTION 53 A. 2 Answer: E QUESTION 54 A. omission of the return statement Answer: AD QUESTION 55 A. reduces memory footprint Answer: AD QUESTION 56 A. int Answer: ADE QUESTION 57 A. -1 Answer: E QUESTION 58 A. The fox jump lazy... Answer: B QUESTION 59 A. 4 Null Answer: D QUESTION 60 A. Zero Answer: D
Exam Code: 1Z0-803
Exam Name: Java SE 7 Programmer I
Given the code fragment:
String valid = "true";
if (valid) System.out.println ("valid");
else system.out.println ("not valid");
What is the result?
B. not valid
C. Compilation fails
D. An IllegalArgumentException is thrown at run time
Given:
public class ScopeTest {
int z;
public static void main(String[] args){
ScopeTest myScope = new ScopeTest();
int z = 6;
System.out.println(z);
myScope.doStuff();
System.out.println(z);
System.out.println(myScope.z);
}
void doStuff() {
int z = 5;
doStuff2();
System.out.println(z);
}
void doStuff2() {
z=4;
}
}
What is the result?
B. 6 5 5 4
C. 6 5 6 6
D. 6 5 6 5
Which two are valid instantiations and initializations of a multi dimensional array?
B. int [] [] array2D = new int [2] [2];
array2D[0] [0] = 1;
array2D[0] [1] =2;
array2D[1] [0] =3;
array2D[1] [1] =4;
C. int [] [] []array3D = {{0, 1}, {2, 3}, {4, 5}};
D. int [] [] [] array3D = new int [2] [2] [2];
array3D [0] [0] = array;
array3D [0] [1] = array;
array3D [1] [0] = array;
array3D [0] [1] = array;
E. int [] [] array2D = {0, 1};
An unchecked exception occurs in a method dosomething(). Should other code be added in the dosomething() method for it to compile and execute?
B. The Exception must be declared to be thrown.
C. The Exception must be caught or declared to be thrown.
D. No other code needs to be added.
Given the code fragment:
int b = 4;
b -- ;
System.out.println (-- b);
System.out.println(b);
What is the result?
B. 1 2
C. 3 2
D. 3 3
Given the code fragment:
interface SampleClosable {
public void close () throws java.io.IOException;
}
Which three implementations are valid?
Public void close () throws java.io.IOException {
/ /do something
}
}
B. public class Test implements SampleCloseable {
Public void close () throws Exception {
/ / do something
}
}
C. public class Test implements SampleCloseable {
public void close() throws java.io.FileNotFoundException { / / do something
}
}
D. public classTest extends SampleCloseable {
Public voidclose ()throws java.IO.IOException{
/ / do something
}
}
E. public class Test implements SampleCloseable {
public void close() / / do something
}
}
Given the following code:
public class Simple { /* Line 1 */
public float price; /* Line 2 */
public static void main (String[] args) { /* Line 3 */
Simple price = new Simple (); /* Line 4 */
price = 4; /* Line 5 */
} /* Line 6 */
} /* Line 7 */
What will make this code compile and run?
Publicint price
B. Change line 4 to the following:
int price = new simple ();
C. Change line 4 to the following:
Floatprice = new simple ();
D. Change line 5 to the following:
Price = 4f;
E. Change line 5 to the following:
price.price = 4;
F. Change line 5 to the following:
Price= (float) 4:
G. Change line 5 to the following:
Price= (Simple) 4;
H. The code compiles and runs properly; no changes are necessary
Given:
public class DoWhile {
public static void main (String [] args) {
int ii = 2;
do {
System.out.println (ii);
} while (--ii);
}
}
What is the result?
1
B. 2
1
0
C. null
D. an infinite loop
E. compilation fails
You are writing a method that is declared not to return a value. Which two are permitted in the method body?
B. return null;
C. return void;
D. return;
Identify two benefits of using ArrayList over array in software development.
B. implements the Collection API
C. is multi.thread safe
D. dynamically resizes based on the number of elements in the list
Which three are valid types for switch?
B. float
C. double
D. integer
E. String
F. Float
Give:
public class MyFive {
static void main(String[] args) {
short ii;
short jj = 0;
for (ii = kk;ii > 6; ii -= 1) { // line x //
jj++;
}
System.out.println("jj = " + jj);
}
}
What value should replace KK in line x to cause jj = 5 to be output?
B. 1
C. 5
D. 8
E. 11
Given the following code fragment:
if (value >= 0) {
if (value != 0)
System.out.print("the ");
else
System.out.print("quick ");
if (value < 10)
System.out.print("brown ");
if (value > 30)
System.out.print("fox ");
else if (value < 50)
System.out.print("jumps ");
else if (value < 10)
System.out.print("over ");
else
System.out.print("the ");
if (value > 10)
System.out.print("lazy ");
} else {
System.out.print("dog ");
}
System.out.print("... ");
}
What is the result if the integer value is 33?
B. The fox lazy...
C. Quick fox over lazy ...
D. Quick fox the ....
Given the code fragment:
Int [] [] array = {{0}, {0, 1}, {0, 2, 4}, {0, 3, 6, 9}, {0, 4, 8, 12, 16}};
Systemout.printIn(array [4] [1]);
System.out.printIn (array) [1][4]);
int [] [] array = {{0}, {0, 1}, {0, 2, 4}, {0, 3, 6, 9}, {0, 4, 8, 12, 16}};
System.out.println(array [4][1]);
System.out.println(array) [1][4]);
What is the result?
B. Null 4
C. An IllegalArgumentException is thrown at run time
D. 4 An ArrayIndexOutOfBoundException is thrown at run time
Given:
public class DoCompare1 {
public static void main(String[] args) {
String[] table = {"aa", "bb", "cc"};
for (String ss: table) {
int ii = 0;
while (ii < table.length) {
System.out.println(ss + ", " + ii);
ii++;
}
}
How many times is 2 printed as a part of the output?
B. Once
C. Twice
D. Thrice
E. Compilation fails.
Post date: 2015-01-12 04:49:32
Post date GMT: 2015-01-12 04:49:32
Post modified date: 2015-01-12 04:49:32
Post modified date GMT: 2015-01-12 04:49:32
Powered by [ Universal Post Manager ] plugin. MS Word saving format developed by gVectors Team www.gVectors.com