最新的Oracle Java Certified Programmer - 1Z0-501免費考試真題

Exhibit:
1 . public class Test {
2 . public static void replaceJ(string text) {
3 . text.replace ('j', 'l');
4 .}
5 .
6 . public static void main(String args[]){
7 . string text = new String ("java")
8 . replaceJ(text);
9 . system.out.printIn(text);
1 0.}
1 1.}
What is the result?

正確答案: A
Given:
8 . int index = 1;
9 . boolean[] test = new Boolean[3];
1 0. boolean foo= test [index];
What is the result?

正確答案: F
Given:
1. public class OuterClass {
2. private double d1 1.0;
3. //insert code here
4. }
You need to insert an inner class declaration at line2. Which two inner class declarations are valid? (Choose Two)

正確答案: A,E
Which two are equivalent? (Choose Two)

正確答案: A,E
CORRECT TEXT
Given
1 . Public class test (
2 .Public static void main (String args[])(
3 .System.out.printIn (6 ^ 3);
4 .)
5 .)
What is the output?
正確答案:
5
Exhibit:
1 . public class enclosingone (
2 . public class insideone{}
3 . )
4 . public class inertest(
5 . public static void main (string[]args)(
6 . enclosingone eo= new enclosingone ();
7 . //insert code here
8 . )
9 . )
Which statement at line 7 constructs an instance of the inner class?

正確答案: C
Given:
1. public class Foo {
2 . public static void main (String [] args){
3 .StringBuffer a = new StringBuffer ("A");
4 .StringBuffer b = new StringBuffer ("B");
5 .operate (a,b);
6 .system.out.printIn{a + "," +b};
7 . )
8 . static void operate (StringBuffer x, StringBuffer y){
9 .x.append {y};
1 0.y = x;
1 1.)
1 2.}
What is the result?

正確答案: F

聯系我們

如果您有任何問題,請留下您的電子郵件地址,我們將在12小時內回复電子郵件給您。

我們的工作時間:( GMT 0:00-15:00 )
週一至週六

技術支持: 立即聯繫 

English 日本語 Deutsch 한국어