Sei sulla pagina 1di 17

1H Facebook

TM

Mesaje primrte - ionicalu

D Student Sign In

D 2013-2015 Oracle Acader

[ UO

C ~ I D ilea rning .o racle.com/ilearn/en/ learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L
~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

1~

0 .
?

Outline

X
Review your answers, feedback, and question scores below. An aste1isk (*) indicates a correct answer.

EJ() 2013201 5 Oracle kademy Em:ll'


1!1

e Section 0 Cou1.,. Resources

8 Section 1 ~ 'Welcome and lntlu.

Section 4
(Answer all questions in this section)

1. You need to - - - - - - J a v a code to generate a .class file

1!1 Secbon 2 tmng AliCe 3

1!10 Secbon ~ - Using Eclipse

Collect
Compile (*)
Package
Assemble

1!10 Secbon 5 U5\ng Control State

1!1 Section 3 Using Green foot


0 & Java Fundamentals Midterm [

1!10 Section 6 l!singArra'}Sand

Correct

2. You can return to the Eclipse Welcome Page by choosing Welcome from what menu?

1!10 Section 7- Using Recursion,

0 Appendix P:. Self Study GUide V

00 Appendix P:. Self Study Guide V


0 0 Appendix P:. Self Study GuideS

3. For eve1y opening curly brace { there does not need to be a closing curly brace} for the program to compile without error. True or False?

00 Appendix P:. Self Study Guide II


0 0 Appendix P:. Self Study Guide I '

True
False (*)

0 0 Appendix P:. Self Study Guide C

4. A workspace can not have more than one stored projects. True or false?

0 0 Appendix P:. Self Study Guide I '


0 0 Appendix P:. Self Study Guide II

True
False (*)

0 0 Appendix P:. Self Study GUide~

Mark for Review


( 1) Points

Correct

5. In the image below, identify the components.

1
2

3
4
5

Mark for Review


( 1) Points

C01rect

00 Appendix P:. Self Study GuideS

00 Appendix P:. Self Study Guide C

for Review
( 1) Points

Correct

0 0 Appendix P:. Self Study GUide C

0 0 Appendix P:. Self Study GUide 1

~lark

File
Edit
Help (* )
Close

0 Java Ftmdamentats Fmal Exa

0 0 Appendix P:. Self Study Guide L

Mark for Review


( 1) Points

/ **
* @par am args
*I

Mark for Review


( 1) Points

--

1H Facebook

TM

Mesaje primrte - ionicalu

D Student Sign In

D 2013-2015 Oracle Acader

[UO

C ~ I D ilea rning .o racle.com/ ilearn/en/ learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

Outline

Correct

3. For eve1y opening curly brace { there does not need to be a closing curly brace} for the program to compile without error. T111e or False?

8 Section 1 ~ 'Welcome and lntlu.

True
False (*)

1!1 Secbon 2 tmng Allee 3

1m

Mark for Review


( 1) Points

0 & Java Fundamentals Midterm [

True
False (*)

1!10 Secbon ~ - Using Eclipse


1!10 Secbon 5 U5\ng Control State

1!10 Section 6 l!singArra'}Sand

Correct

5. In the image below, identify the components.

1!10 Section 7- Using Recursion,

--

C01rect

4. A workspace can not have more than one stored projects. True or false>

1!1 Section 3 Using Green foot

...

Mark for Review


(1) Points

EJ() 20132015 Oracle kademy Em:ll'


1!1 Section 0 Cou1.,. Resources

1:
34

0 Java Ftmdamentats Fmal Exa

1
2
3
4
5
6
7
8
9
10
11
12
13

0 Appendix P:. Self Study GUide V

00 Appendix P:. Self Study Guide V


0 0 Appendix P:. Self Study GuideS

0 0 Appendix P:. Self Study Guide L


0 0 Appendix P:. Self Study GUide C

00 Appendix P:. Self Study Guide II


0 0 Appendix P:. Self Study Guide I '
0 0 Appendix P:. Self Study Guide C
0 0 Appendix P:. Self Study GUide 1

00 Appendix P:. Self Study GuideS


0 0 Appendix P:. Self Study Guide I '
0 0 Appendix P:. Self Study Guide II

0 0 Appendix P:. Self Study GUide~


00 Appendix P:. Self Study Guide C

~lark

pac kage studyTool; ~


public c l as s Study Pa ge {
/ **
* @param args

AJ

__./

(B)

*I
public sta tic void main(String[] args ) {
//TODO Auto-generated method stub
}

for Review
( 1) Points

f'-

~
__./

A-Main Method, B-Ciass, C-Package


A-Class, B-MainMethod, C-Package
A-Package, B-Main ~tethod, C-Ciass (* )
None of the above
~

Page 1 of 10

. ...
';!

Correct

I Next I I Summary I

~~~~~~~~~~~~~~~~~~ ...
~~
u<u~
y
_
.
_ _._. _- u_",._ _ _ __ j

SnapShot: p rintscreen

'\. x

The screen shot has succesfully been saved to disk


RO~

~
I IC >l
13:34
'
> ~ v
'='
16.05.2015

1H Facebook

TM

Mesaj e primrte - ionicalu

D Student Sign In

D 2013-2015 Oracle Acader

[UO

C ~ I D ilea rning .o racle.com/ilearn/en/ learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

EJ() 2013201 5 Oracle kademy Em:ll'

Outline

Section 4
(Answer all questions in this section)
6. The following defines a class keyword:

1!1 Section 3 Using Green foot

1!10 Section 7- Using Recursion,


0 Java Ftmdamentats Fmal Exa

0 Appendix P:. Self Study GUide V

~tark

8. Select the declaration and initialization statement that will hold the letter J.

0 0 Appendix P:. Self Study GUide C


Appendix P:. Self Study Guide II

0 0 Appendix P:. Self Study Guide I '

0 0 Appendix P:. Self Study GUide 1


00 Appendix P:. Self Study Guide S
0 0 Appendix P:. Self Study Guide I '

Mark for Review


( 1) Points

C01rect

9. What is the output of the following lines of code?

Mark for Review


( 1) Points

int j=6,k=8,m=2,result;
result=j-k%3* m;
System .out. println( result);
6
0
-42
2 (* )

0 0 Appendix P:. Self Study Guide II

0 0

for Review
( 1) Points

int letter='J';
float letter='J';
String letter='J';
char letter='J'; (* )

0 0 Appendix P:. Self Study Guide L

0 0 Appendix P:. Self Study Guide C

Correct

0 0 Appendix P:. Self Study Guide S

00

1m
-

Contains a main method and other static methods. (*)


Contains classes that define objects.
Contains a main method, a package, static methods, and classes that define objects.
None of the above.

1!10 Section 6 Using Arrays and

Appendix P:. Self Study Guide V

Incorrect. Refer to Section 4 Lesson 2.

7. Which of the following defines a driver class>

1!10 Secbon 5 U5\ng Control State

00

--

Provides the compiler information that identifies outside classes used within the current class.
Precedes the name of the class. (* )

1!1 Secbon 2 . tmng Allee 3

1!10 Secbon ~ - Using Eclipse

o Defines where this class lives relative to other classes, and provides a level of access control.

8 Section 1 ~ 'Welcome and lntlu.

& Java Fundamentals Midterm [

...
34

Mark for Review


( 1) Points

1!1e Section 0 Cou1.,. Resources

1:

Appendix P:. Self Study GUide~

00 Appendix P:. Self Study Guide C

C01rect

10. Which of the following instantiates a String named name to Oracle>

Mark for Review


( 1) Points

St1ing name;
St>i ng Oracle="name";
St1ing name="name";
o St>i ng name="Oracle"; (* )

. ...

'l'

SnapShot: printscreen

Correct

~~~~~~~~~~~~~~~~~~

...__
U<U
_'Y_
._

._ . _- _UU
_

_____

The screenshot has succesfully been saved to disk

RO ~ --:_ ~
I >C >l
13:34
r, ~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaje primrte - ionicalu

C) Student Sign In

D 2013-2015 Oracle Acader

[UO

C ~ I D ilea rning .o racle.com/ilearn/en/learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

><

0
?

--

1m
-

Review your answers, feedback, and question scores below. An aste1isk (*) indicates a correct answer.

e Section 0 - CoUI'<e Resources

8 Section 1 ~ 'Welcome and lntlu.

Section 4
(Answer all questions in this section)
11. What is printed by the following code segment?

I!J.... Secbon 2 - tmng Allee 3

I!J.... Section 3 - tmng Green foot

1!1..0 Secbon ~ - tmng Eclipse

2
3
4

1!1.. 0 Secbon 5 - U5\ng Control State

0 .. f) Java Fundamentals Midterm [

1!1.. 0

...
34

~~~ert
~:~Ja~v~a~F~u~l~
l d~~~~~~
~~~l~s~f~il~l~
~~
~~------------------------------------------------------------------------------------------------------------------~

EJ... () 2013-201 5 Oracle kademy Em:ll'


I!J...

Outline

1:

St ring s=" \ \ \ \ ";


fo r ( i n t i=O; i <5; i++ )
s +="\ \ " ;

Syst e m.out .printl n ( s );

\\\\

Section 6 - tmngArra'}5and

\\\\\\\ (*)

1!1..0 Section 7- tmng Recursion,

\\\\\\\\\\\\\\
\\

0 Java Ftmdamentats Fmal Exa

0 .... Appendix P:. Self Study GUide V


0 .. 0 Appendix P:. Self Study Guide V

Mark for Review


( 1) Points

Correct

12. The following program prints "Not Equal":

Mark for Review


( 1) Points

0 .. 0 Appendix P:. Self Study GuideS

0 ..0 Appendix P:. Self Study Guide L

S t ring s = na b cdef";

0 .. 0 Appendix P:. Self Study GUide C

i f ( s.subs t ring (0 ,3 ) = " a b c" )

0 .. 0 Appendix P:. Self Study Guide II

Syst em. o ut . p rin t l n ( "Eq u al " ) ;

4
5
6

0 .. 0 Appendix P:. Self Study Guide I'


0 ..0 Appendix P:. Self Study Guide C

e l se
Syst em. o ut . p rintl n ( "No t

Equal " );

0 .. 0 Appendix P:. Self Study GUide 1


0 .. 0 Appendix P:. Self Study GuideS

True or false>
True (*)
False

0 .. 0 Appendix P:. Self Study Guide I'


0 ..0 Appendix P:. Self Study Guide II

0 .. 0 Appendix P:. Self Study GUide~


0 .. 0 Appendix P:. Self Study Guide C

Correct

13. The following code is an example of instantiating a String object:


String str

~tark

for Review
( 1) Points

~tark

for Review
( 1) Points

= String( "Hello" );

True or false>
True
False (*)

Correct

14. Given the code:

. ...

'l'

String s = new String(" abc");

~~~~~~~~~~~~~~~~~~

...__
U<U
_'Y_
._

._ . _- _UU
_ __ __ _

SnapShot: printscreen
The screen shot has succesfully been saved to disk
RO~

~
I IC >l
13:34
'
~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaje primrte - ionicalu

D Student Sign In

D 2013-2015 Oracle Acader

[UO

C ~ I D ilea rning .o racle.com/ilearn/en/ learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

System.out.print l n ( "Equal" );

3
4

1!1e Section 0 Cou1.,. Resources


8 Section 1 ~ 'Welcome and lntlu.

0
?

--

1m

System.out.print l n ( "Not Equal ");

True or false?

1!1 Secbon 2 tmng Allee 3


1!1 Section 3 Using Green foot

True (*)
False

0 & Java Fundamentals Midterm [

1!10 Secbon ~ - Using Eclipse

...
34

el s e

5
6

EJ() 2013201 5 Oracle kademy Em:ll'

Outline

1:

C01rect

13. The following code is an example of instantiating a String object:

1!10 Secbon 5 U5\ng Control State

String str

Mark for Review


( 1) Points

= String( "Hello" );

1!10 Section 6 Using Arrays and


True or false?

1!10 Section 7- Using Recursion,

True
False (*)

0 Java Ftmdamentats Fmal Exa


0 Appendix P:. Self Study GUide V

00

0 0 Appendix P:. Self Study Guide S

0 0

Appendix P:. Self Study Guide V

14. Given the code:

Which of the following statements will change the length of s to the largest length?

Appendix P:. Self Study Guide II

s.trim()
s.replace("a", "aa")
s.substring(2)
s.toUpperCase()
None of the above will change the length of s. (*)

0 0 Appendix P:. Self Study Guide I '


0 0 Appendix P:. Self Study Guide C
0 0 Appendix P:. Self Study GUide 1

00

Mark for Review


( 1) Points

String s = new String("abc");

Appendix P:. Self Study Guide L

0 0 Appendix P:. Self Study GUide C

00

Conect

Appendix P:. Self Study Guide S

Conect

0 0 Appendix P:. Self Study Guide I '


0 0 Appendix P:. Self Study Guide II

0 0

Appendix P:. Self Study GUide~

00 Appendix P:. Self Study Guide C

Section 5
(Answer all Questions in this section)

15. Which of the following is true about a do-while loop?

~tark

for Review
( 1) Points

It is a post-test loop.
It is a modified while loop that allows the program to run through the loop once before testing the boolean condition.
It continues looping until the condition becomes false.
All of the above. (*)

0
Previous

. ...

'l'

Incorrect. Refer to Section 5 Lesson 2.

I Page 3 of 10 I Next I I Summary I

~ x

The screen shot has succesfully been saved to disk

~~~~~~~~~~~~~~~~~~

SnapShot: p rintscreen

...__
U<U
_'Y_
._

._ . _- _UU
_

_____

RO~

~
I >C >l
13:34
'
~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaj e primrte - ionicalu

C) Student Sign In

D 2013-2015 Oracle Acader

[ UO

C ~ I D ilea rning .o racle.com/ilearn/en/learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

><

EJ... () 2013-201 5 Oracle kademy Em:ll'


I!J...

e Section 0 - CoUI'<e Resources

8 Section 1 ~ 'Welcome and lntlu.

Outline

--

1m
A

Review your answers, feedback, and question scores below. An aste>isk (*) indicates a correct answer.
Section 5
(Answer all questions in this section)
16. All of the following are essential to initializing a for loop, except which one?

1!1..0 Secbon ~ - tmng Eclipse

Initializing the iterator(i).


Having a conditional statement.
Updating the counter.
Having an if statement. (*)

1!1.. 0 Secbon 5 - U5\ng Control State

I!J.... Section 3 - tmng Green foot

0 .. f) Java Fundamentals Midterm [

Mark for Review


(1) Points

Correct

17. How many times will the following loop be executed>


What is the value of x after the loop has finished?
What is the value of count after the loop has finished?

1!1..0 Section 7- tmng Recursion,

...

~~~ert
~:~Ja~v~a~F~u~l~
l d~~~~~~
~~~l~s~f~il~l~
~~
~~------------------------------------------------------------------------------------------------------------------~

I!J.... Secbon 2 - tmng Allee 3

1!1.. 0 Section 6 - tmngArra'}5and

1:
34

~lark

for Review
( 1) Points

0 Java Ftmdamentats Fmal Exa


0 .... Appendix P:. Self Study GUide V
0 .. 0 Appendix P:. Self Study Guide V
0 .. 0 Appendix P:. Self Study GuideS
0 ..0 Appendix P:. Self Study Guide L

int count= 17;


int x = 1;
while( count > x){
x*=3;
count-=3;
}
4; 8; 27
3; 27; 8 (*)
5; 27; 8

0 .. 0 Appendix P:. Self Study GUide C


0 .. 0 Appendix P:. Self Study Guide II
0 .. 0 Appendix P:. Self Study Guide I'

5; 30; 5

0 ..0 Appendix P:. Self Study Guide C

3; 9; 11
~

0 .. 0 Appendix P:. Self Study GUide 1


0 .. 0 Appendix P:. Self Study GuideS

C01rect

18. Which of the following are relational operators in Java?

Mark for Review


( 1) Points

0 .. 0 Appendix P:. Self Study Guide I'


0 ..0 Appendix P:. Self Study Guide II

(Choose all correct answers)

., < (*)
., <= (*)

0 .. 0 Appendix P:. Self Study GUide~


0 .. 0 Appendix P:. Self Study Guide C

., ! = (*)

All of the above.


~

Correct

19. The six relational operators in Java are:

~lark

for Review
( 1) Points

>,<r =,!,< =,> =

. ...

>,<r ==,~=,< =,> =

(*)

~ ~ -------

-----

- - - --------

------,
RO '"""

"""' .....

G I"
'='

>C ,;

13:34

16.05.2015

1H Facebook

TM

Mesaj e primrte - ionicalu

D Student Sign In

D 2013-2015 Oracle Acader

[UO

C ~ I D ilea rning .o racle.com/ilearn/en/ learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

Outline

x* =3;
count-=3;
}

EJ... () 20132015 Oracle kademy Em:ll'

1!1.. e Section 0 Cou1.,. Resources


8 Section 1 ~ 'Welcome and lntlu.

I!J.... Secbon 2 tmng Al>ee 3


I!J.... Section 3 tmng Green foot

0 .. f) Java Fundamentals Midterm [

4;
3;
5;
5;
3;

8; 27
27; 8 (*)
27; 8
30; 5
9; 11

Correct

18. Which of the following are relational operators in Java?

1!1..0 Secbon ~ - tmng Eclipse

1:

...
34

0
?

--

1m

~lark for Review

( 1) Points

1!1.. 0 Secbon 5 U5\ng Control State


(Choose all correct answers)

1!1.. 0 Section 6 tmngArra'}Sand

., < (*)

1!1.. 0 Section 7- tmng Recursion,

., <= (*)

0 Java Ftmdamentats Fmal Exa


0 .... Appendix P:. Self Study GUide V

., ! = (*)

0 .. 0 Appendix P:. Self Study Guide V

All of the above.

0 .. 0 Appendix P:. Self Study GuideS


0 ..0 Appendix P:. Self Study Guide L

C01rect

19. The six relational operators in Java are:

Mark for Review


( 1) Points

0 .. 0 Appendix P:. Self Study GUide C


0 .. 0 Appendix P:. Self Study Guide II

>, <, =,~, < =,> =

0 .. 0 Appendix P:. Self Study Guide I'

>, <, ==,!=, <=,> = (*)


>, <, =,!=, <=,> =
>, <, =,!=, =<, =>

0 ..0 Appendix P:. Self Study Guide C


0 .. 0 Appendix P:. Self Study GUide 1

0 .. 0 Appendix P:. Self Study GuideS


0 .. 0 Appendix P:. Self Study Guide I'

Correct

20. The following prints Yes on the screen. True or false?

0 ..0 Appendix P:. Self Study Guide II

String [] words={ "Yesn, 11 No"};

0 .. 0 Appendix P:. Self Study GUide~

2
3
4

String
s= (wo rds. length <words[l] . length( ))?wo rds [O] :words[1];
System.out.println ( s);

0 .. 0 Appendix P:. Self Study Guide C

~lark

for Review
( 1) Points

5
True
False(* )
~

Previous

. ...

'l'

Correct

I Page 4 of 10 I Next I

Summary

~ x

The screen shot has succesfully been saved to disk

~~~~~~~~~~~~~~~~~~

SnapShot: p rintscreen

...__
U<U
_'Y_
._

._ . _- _UU
_

_____

RO~

~
I >C >l
13:34
'
, ~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaj e primrte - ionicalu

C) Student Sign In

D 2013-2015 Oracle Acader

[UO

C ~ I D ilea rning .o racle.com/ilearn/en/ learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L
~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

><

0 .

--

Outline

~~~ert
~:~Ja~v~a~F~u~l~
l d~~~~~~
~~~l~s~f~il~l~
~~
~~---------------------------------------------------------------------------------------------------------------------
Review your answers, feedback, and question scores below. An aste>isk (*) indicates a correct answer.

EJ... () 2013-201 5 Oracle kademy Em:ll'


I!J...

1~

e Section 0 - CoUI'<e Resources

8 Section 1 ~ 'Welcome and lntlu.

Section 6
(Answer all questions in this section)
21. Big-0 Notation is used in Computer Science to desCiibe the pe1formance of Sorts and Searches on arrays. True or false>

Mark for Review


(1) Points

I!J.... Secbon 2 - tmng Allee 3

True (*)
False

I!J.... Section 3 - tmng Green foot

0 .. f) Java Fundamentals Midterm [

1!1..0 Secbon ~ - tmng Eclipse


1!1.. 0 Secbon 5 - U5\ng Control State

22. Which of the following best describes lexicographical order>

1!1.. 0 Section 6 - tmngArra'}5and

~lark

0 Java Ftmdamentats Fmal Exa


0 .... Appendix P:. Self Study GUide V

0 .. 0 Appendix P:. Self Study Guide V

Correct

23. Binary searches can be pe>formed on sorted and unsorted data. True or false>

Mark for Review


( 1) Points

0 ..0 Appendix P:. Self Study Guide L

True
False (*)

0 .. 0 Appendix P:. Self Study GUide C


0 .. 0 Appendix P:. Self Study Guide II

0 .. 0 Appendix P:. Self Study Guide I'


0 ..0 Appendix P:. Self Study Guide C

C01rect

24. A sequntial search is an iteration through the a>ray that stops at the index where the desired element is found. True or false?

Mark for Review


( 1) Points

0 .. 0 Appendix P:. Self Study GUide 1

True (*)
False

0 .. 0 Appendix P:. Self Study GuideS


0 .. 0 Appendix P:. Self Study Guide I'

0 ..0 Appendix P:. Self Study Guide II


0 .. 0 Appendix P:. Self Study GUide~

for Review
( 1) Points

A simple so>ting algorithm that is inefficient on large a1rays.


An order based on the ASCII value of characters. (*)
A complex sorting algorithm that is efficient on large a1rays.
The order of indicies after an a1ray has been sorted.

1!1..0 Section 7- tmng Recursion,

0 .. 0 Appendix P:. Self Study GuideS

Correct

Correct

25. Which of the following declares and initializes a one dimensional array named words of size 3 so that all entries can be Strings?

Mark for Review


( 1) Points

0 .. 0 Appendix P:. Self Study Guide C

String strings=new String[ 3];


String[) word ={ "Over","the","mountain"}; (*)
String[) word =new String[ 3);
String[) words={"Oracle","Academy"} );

G
Previous

Incorrect. Refer to Section 6 Lesson 1.

Page 5 of 10

I Next I I Summary I

. ...

'l'

~ x

The screen shot has succesfully been saved to disk

~~~~~~~~~~~~~~~~~~

SnapShot: p rintscreen

...__
U<U
_'Y_
._

._ . _- _UU
_ __ __ _

RO~

. ~
I >C >l
13:34
'
, ~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaj e primrte - ionicalu

C) Student Sign In

D 2013-2015 Oracle Acader

[UO

C ~ I D ilea rning .o racle.com/ilearn/en/learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

><

...
34

0
?

--

1m
-

~~~ert
~:~Ja~v~a~F~u~l~
l d~~~~~~
~~~l~s~f~il~l~
~~
~~------------------------------------------------------------------------------------------------------------------~

Review your answers, feedback, and question scores below. An aste1isk (*) indicates a correct answer.

EJ... () 2013-201 5 Oracle kademy Em:ll'


I!J...

Outline

1:

e Section 0 - CoUI'<e Resources

8 Section 1 ~ 'Welcome and lntlu.

Section 6
(Answer all questions in this section)
26. What is the output of the following segment of code if the command line arguments are "a b c d e f'?

I!J.... Secbon 2 - tmng Allee 3

I!J.... Section 3 - tmng Green foot

2
3
4
5

0 .. f) Java Fundamentals Midterm [


1!1..0 Secbon ~ - tmng Eclipse
1!1.. 0 Secbon 5 - U5\ng Control State
1!1.. 0 Section 6 - tmngArra'}5and

public class Appl icat i on {


public sta t ic vo id main(St ring[] args )
System.out.println {arg s. length);

0 .... Appendix P:. Self Study GUide V

1
3
5
6 (*)
This code doesn't compile.

0 .. 0 Appendix P:. Self Study Guide V

1!1..0 Section 7- tmng Recursion,

0 Java Ftmdamentats Fmal Exa

0 .. 0 Appendix P:. Self Study GuideS


0 ..0 Appendix P:. Self Study Guide L

Correct

27. The following segment of code initializes a 2 dimensional array of primitive data types. True or false?

Mark for Review


( 1) Points

double[)[] a= new double[4)[5);

0 .. 0 Appendix P:. Self Study GUide C

o True (*)

0 .. 0 Appendix P:. Self Study Guide II

False

0 .. 0 Appendix P:. Self Study Guide I'


0 ..0 Appendix P:. Self Study Guide C

Mark for Review


( 1) Points

Conect

28. Which of the following declares a one dimensional array name scores of type int that can hold 14 values?

Mark for Review


( 1) Points

0 .. 0 Appendix P:. Self Study GUide 1


0 .. 0 Appendix P:. Self Study GuideS

int scores;

0 .. 0 Appendix P:. Self Study Guide I'

o int[) scores=new int[14]; (*)

int[) scores=new scores int[14);


int score= new int[14);

0 ..0 Appendix P:. Self Study Guide II


0 .. 0 Appendix P:. Self Study GUide~

0 .. 0 Appendix P:. Self Study Guide C

Correct

29. What is wrong with this code?

1
2

~lark

t r y{
i f (x < 0)

for Review
( 1) Points

throw new Except i on ( "Your a nswer i s nega t i ve");

cat c h {
System .out.print l n("Enter your v alue again.")i

. ...

'l'

~~~~~~~~~~~~~~~~~~

...__
U<U
_'Y_
._

SnapShot: p rintscreen

~ x

The screen shot has succesfully been saved to disk

7
-

._ . _- _UU
_ __ __ _

RO~

~
I IC >l
13:34
'
~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaj e primrte - ionicalu

D Student Sign In

D 2013-2015 Oracle Acader

[UO

C ~ I D ilea rning .o racle.com/ilearn/en/ learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L
~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

8 Section 1 ~ 'Welcome and lntlu.

~lark

Correct

28. Which of the following declares a one dimensional array name scores of type int that can hold 14 values?

& Java Fundamentals Midterm [

Mark for Review


( 1) Points

int scores;
int[] scores=new int[14]; (* )
int[] scores=new scores int[14];
int score= new int[14];

1!10 Secbon ~ - Using Eclipse


1!10 Secbon 5 U5\ng Control State
1!10 Section 6 Using Arrays and

1!10 Section 7- Using Recursion,

0 Java Ftmdamentats Fmal Exa

for Review
( 1) Points

True (*)
False

e Section 0 Cou1.,. Resources

1!1 Section 3 Using Green foot

--

double[)[] a=new double[ 4][5];

1!1

1!1 Secbon 2 . tmng Allee 3

0 .

Outline

27. The following segment of code initializes a 2 dimensional arrav of ptimitive data types. True or false?

EJ() 2013201 5 Oracle kademy Em:ll'

1~

C01rect

29. What is wrong with this code?

0 Appendix P:. Self Study GUide V

00 Appendix P:. Self Study Guide V

2
3
4
5
6
7

0 0 Appendix P:. Self Study Guide S


0 0 Appendix P:. Self Study Guide L
0 0 Appendix P:. Self Study GUide C

00 Appendix P:. Self Study Guide II


0 0 Appendix P:. Self Study Guide I '

Mark for Review


( 1) Points

t r y{

i f (x < 0 )
t hr ow new Exception ("Your a nswer i s nega t i ve")i

catch {
System. out.print l n ( "Enter your v alue a g ain.");

00 Appendix P:. Self Study Guide S

It is missing a semicolon.
It does not compile. (* )
It gives you an out of bounds exception.
There is nothing wrong with this code.

0 0 Appendix P:. Self Study Guide I '

0 0 Appendix P:. Self Study Guide C


0 0 Appendix P:. Self Study GUide 1

Conect

0 0 Appendix P:. Self Study Guide II

0 0 Appendix P:. Self Study GUide~


00 Appendix P:. Self Study Guide C

Section 7
(Answer all Questions in this section)
30. What operator do you use to call an object's constructor method and create a new object>

~lark

for Review
( 1) Points

+
new(* )
instanceOf
~

Previous

. ...

'l'

Correct

I Page 6 of 10 I Next I

Summary

~ x

The screen shot has succesfully been saved to disk

~~~~~~~~~~~~~~~~~~

SnapShot: p rintscreen

...__
U<U
_'Y_
._

._ . _- _UU
_

_____

RO~

. ~
I >C >l
13:34
'
, ~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaj e primrte - ionicalu

C) Student Sign In

D 2013-2015 Oracle Acader

[UO

C ~ I D ilea rning .o racle.com/ilearn/en/learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

><

--

1m
A

e Section 0 - CoUI'<e Resources

Section 7
(Answer all questions in this section)
31. A class can only have one constructor. True or false>

Mark for Review


( 1) Points

I!J.... Secbon 2 - tmng Allee 3

True
False (*)

I!J.... Section 3 - tmng Green foot

0 .. f) Java Fundamentals Midterm [

1!1..0 Secbon ~ - tmng Eclipse


1!1.. 0 Secbon 5 - U5\ng Control State
1!1.. 0 Section 6 - tmngArra'}5and
1!1..0 Section 7- tmng Recursion,

0 Java Ftmdamentats Fmal Exa

for Review
( 1) Points

~lark

for Review
( 1) Points

Classes cannot include strings.


Classes cannot include mixed data types.
The constructor method has no definition. (*)
There is nothing wrong.

0 .. 0 Appendix P:. Self Study GuideS


0 ..0 Appendix P:. Self Study Guide L

0 .. 0 Appendix P:. Self Study GUide C

Correct

33. Which of the following creates an instance of the class below>

0 .. 0 Appendix P:. Self Study Guide I'

0 ..0 Appendix P:. Self Study Guide C

p ublic c la ss Th i sC la ss
priv a t e i nt a=4, b=S;
Th i sCla ss ( i n t x ) (
a=x *b ;

2
3
4

0 .. 0 Appendix P:. Self Study GUide 1


0 .. 0 Appendix P:. Self Study GuideS

5
6

0 .. 0 Appendix P:. Self Study Guide I'


0 ..0 Appendix P:. Self Study Guide II
0 .. 0 Appendix P:. Self Study GUide~

ThisCiass t=new ThisCiass();


ThisCiass t;
ThisCiass t=new ThisCiass(3,4);
ThisCiass t=new ThisCiass(S); (*)

0 .. 0 Appendix P:. Self Study Guide C

Conect

34. All objects, in Java, are created using int. True or false?
True
False (*)
~

...__
U<U
_'Y_
._

Mark for Review


( 1) Points

Correct

SnapShot: p rintscreen

~ x

The screenshot has succesfully been saved to disk

~~~~~~~~~~~~~~~~~~

~lark

class Account{ ;
p>ivate int number;
p1ivate String name;;
public Account;
}

0 .. 0 Appendix P:. Self Study Guide V

0 .. 0 Appendix P:. Self Study Guide II

Correct

32. What is wrong with the following class declaration?

0 .... Appendix P:. Self Study GUide V

'l'

Review your answers, feedback, and question scores below. An aste>isk (*) indicates a correct answer.

8 Section 1 ~ 'Welcome and lntlu.

. ...

...
34

~~~ert
~:~Ja~v~a~F~u~l~
l d~~~~~~
~~~l~s~f~il~l~
~~
~~------------------------------------------------------------------------------------------------------------------~

EJ... () 2013-2015 Oracle kademy Em:ll'


I!J...

Outline

1:

._ . _- _UU
_ __ __ _

RO~

. ~
I >C >l
13:34
'
, ~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaje primrte - ionicalu

D Student Sign In

D 2013-2015 Oracle Acader

[UO

C ~ I D ilea rning .oracle.com/ilearn/en/ learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

Outline

Correct

32. What is wrong with the following class declaration?


EJ... () 20132015 Oracle kademy Em:ll'

8 Section 1 ~ 'Welcome and lntlu.

I!J.... Secbon 2 tmng Al>ee 3


I!J.... Section 3 tmng Green foot

1!1..0 Secbon ~ - tmng Eclipse


1!1.. 0 Secbon 5 U5\ng Control State

~tark

for Review
( 1) Points

~tark

for Review
( 1) Points

--

1m

Correct

33. Which of the following creates an instance of the class below?

1!1.. 0 Section 7- tmng Recursion,

34

Classes cannot include st>ings.


Classes cannot include mixed data types.
The constructor method has no definition. (* )
There is nothing wrong.

0 .. f) Java Fundamentals Midterm [

1!1.. 0 Section 6 tmngArra'}Sand

...

class Account{ ;
private int number;
private String name;;
public Account;
}

1!1.. e Section 0 Cou1.,. Resources

1:

0 Java Ftmdamentats Fmal Exa

publ ic c lass Th i sC la ss

0 .... Appendix P:. Self Study GUide V

2
3
4

priv a t e i nt a=4 , b=S;

0 .. 0 Appendix P:. Self Study Guide V


0 .. 0 Appendix P:. Self Study GuideS

Th i sC la ss ( i nt x )

a=x ....b ;

5
6

0 ..0 Appendix P:. Self Study Guide L


0 .. 0 Appendix P:. Self Study GUide C

0 ..0 Appendix P:. Self Study Guide C

ThisCiass t=new ThisCiass();


ThisCiass t;
ThisCiass t=new ThisCiass(3,4);
ThisCiass !=new ThisCiass(5); (* )

0 .. 0 Appendix P:. Self Study GUide 1

0 .. 0 Appendix P:. Self Study Guide II


0 .. 0 Appendix P:. Self Study Guide I'

0 .. 0 Appendix P:. Self Study GuideS

Correct

34. All objects, in Java, are created using int. True or false?

Mark for Review


( 1) Points

0 .. 0 Appendix P:. Self Study Guide I'


0 ..0 Appendix P:. Self Study Guide II
0 .. 0 Appendix P:. Self Study GUide~

True
False (*)

0 .. 0 Appendix P:. Self Study Guide C

Correct

35. A constructor is used to create objects. True or false?

~tark

for Review
( 1) Points

True (*)
False
~

Previous

. ...

'l'

Correct

I Page 7 of 10 I Next I

Summary

~ x

The screen shot has succesfully been saved to disk

~~~~~~~~~~~~~~~~~~

SnapShot: p rintscreen

...__
U<U
_'Y_
._

._ . _- _UU
_

_____

RO~

~
I >C >l
13:34
'
~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaje primrte - ionicalu

C) Student Sign In

D 2013-2015 Oracle Acader

[ UO

C ~ I D ilea rning .o racle.com/ilearn/enjlearner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

><

Outline

1:

...
35

0
?

--

1m
-

~~~ert
~:~Ja~v~a~F~u~l~
l d~~~~~~
~~~l~s~f~il~l~
~~
~~------------------------------------------------------------------------------------------------------------------~

Review your answers, feedback, and question scores below. An aste1isk (*) indicates a correct answer.

EJ... () 2013-2015 Oracle kademy Em:ll'


I!J.... Section 0 - CoUI'<e Resources
8 Section 1 ~ 'Welcome and lntlu.

Section 7
(Answer all questions in this section)
36. Which of the following is the conect way to call an overriden method needOil() of a super class Robot in a subclass SqueakyRobot?

Mark for Review


( 1) Points

I!J.... Secbon 2 - tmng Allee 3

1!1..0 Secbon ~ - tmng Eclipse

Robot.needOii(SqueakyRobot);
SqueakyRobot.needOil();
super.needOil(); (*)
needOii(Robot);

1!1.. 0 Secbon 5 - U5\ng Control State

I!J.... Section 3 - tmng Green foot

0 .. f) Java Fundamentals Midterm [

1!1.. 0 Section 6 - tmngArraysand

Correct

37. Which of the following co1rectly describes an "is-a" relationship?

~lark

1!1..0 Section 7- tmng Recursion,


A helpful term used to conceptualize the relationships among nodes or leaves in an inheritance hierarchy. (*)
A programming philosophy that promotes simpler, more efficient coding by using exiting code for new applications.
It restricts access to a specified segment of code.
A programming philosophy that promotes protecting data and hiding implementation in order to prese1ve the integrity of data and methods.

0 Java Ftmdamentats Fmal Exa


0 .... Appendix P:. Self Study GUide V
0 .. 0 Appendix P:. Self Study Guide V
0 .. 0 Appendix P:. Self Study GuideS
0 ..0 Appendix P:. Self Study Guide L
0 .. 0 Appendix P:. Self Study GUide C

for Review
( 1) Points

Correct

38. Consider creating a class Square that extends the Rectangle class provided below. Knowing that a square always has the same width and length, which of the following best
represents a constructor for the Square class?

0 .. 0 Appendix P:. Self Study Guide II

public class Rect a ngle ext ends Sh a pe {

0 .. 0 Appendix P:. Self Study Guide I'

priv a t e i nt length;
priv a t e i nt width;

2
3
4
5
6
7
8
9

0 ..0 Appendix P:. Self Study Guide C


0 .. 0 Appendix P:. Self Study GUide 1
0 .. 0 Appendix P:. Self Study GuideS
0 .. 0 Appendix P:. Self Study Guide I'
0 ..0 Appendix P:. Self Study Guide II
0 .. 0 Appendix P:. Self Study GUide~
0 .. 0 Appendix P:. Self Study Guide C

Mark for Review


( 1) Points

public Rect a ngle {String color, i nt length , i nt width) {


super (color );
t h i s. length = length;
thi s.wi dth = wi d th;

public Squ are (St ring color, i nt length , i nt wi dth) {

t h i s.co l o r=co l o r ;

3
4

thi s. length = length;


t h i s.wi dth = wi dth ;

5
1

. ...

'l'

public Square {String color, i nt s ize ) {


Rect a ng le ( color, s ize , s ize )

~~---------------~

...__
U<U
_'Y_
._

._ . _- _UU
______

SnapShot: p rintscreen

~ x

The screen shot has succesfully been saved to disk

RO ~

- ~
I C '
13:35
'
, ~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaje primrte - ionicalu

C) Student Sign In

D 2013-2015 Oracle Acader

[ UO

C ~ I D ilea rning .o racle.com/ilearn/enj learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

...
35

0
?

I!J.... Section 0 - CoUI'<e Resources

p ub lic Squ are (St ring color, i n t

8 Section 1 ~ 'Welcome and lntlu.

I!J.... Section 3 - tmng Green foot

0 .. f) Java Fundamentals Midterm [


1!1..0 Secbon ~ - tmng Eclipse

thi s. length = lengt h ;


t h i s.widt h = widt h ;

p ublic Square (St ring color, int s ize ) {

1!1.. 0 Secbon 5 - U5\ng Control State

Rect a ng le ( color, s ize ,

Section 6 - tmngArraysand

length , i nt widt h ) {

t h i s.co l o r=color ;

2
3
4
5

I!J.... Secbon 2 - tmng Allee 3

--

1m
-

8
9

EJ... () 2013-2015 Oracle kademy Em:ll'

1!1.. 0

Outline

1:

s ize )

1!1..0 Section 7- tmng Recursion,

0 Java Ftmdamentats Fmal Exa

0 .... Appendix P:. Self Study GUide V

2
3

0 ..0 Appendix P:. Self Study Guide V

0 .. 0 Appendix P:. Self Study GuideS

0 ..0 Appendix P:. Self Study Guide L

2
3

0 .. 0 Appendix P:. Self Study GUide C

th i s.su per ( Rectangle, color, s ize, s ize ) ;

p ublic Squ are (St ring color, i n t

s i ze ) {

s u per ( color, s ize , s i ze ) ;

(* )
None of the above.

0 ..0 Appendix P:. Self Study Guide II


0 .. 0 Appendix P:. Self Study Guide I'

0 ..0 Appendix P:. Self Study Guide C


0 .. 0 Appendix P:. Self Study GUide 1

p ublic Squ are {St ring color, i n t s ize ) {

!neon-eel. Refer to Section 7 Lesson 4.

39. If a variable in a superclass is private, could it be directly accessed or modified by a subclass? Why or why not>

Mark for Review


( 1) Points

0 ..0 Appendix P:. Self Study GuideS

0 .. 0 Appendix P:. Self Study GUide~

Yes. A subclass inherits full access to all contents of its super class.
Yes. Any variable passed through inheritance can be changed, but private methods cannot
No. A private variable can only be modified by the same class with which it is declared regardless of its inheritance. (* )
No. Nothing inherited by the super class can be changed in the subclass.

0 ..0 Appendix P:. Self Study Guide C

0 .. 0 Appendix P:. Self Study Guide I'

0 ..0 Appendix P:. Self Study Guide II

COITeCt

40. It is possible to return an object from a method. True or false>

~tark

for Review
( 1) Points

True (*)
False

0
Previous

. ...

'l'

Incorrect Refer to Section 7 Lesson 2.

Page 8 of 10

I Next I I Summary I

~ x

The screen shot has succesfully been saved to disk

~~---------------~

SnapShot: p rintscreen

...__
U<U
_'Y_
._

._ . _- _UU
_ __ __ _

RO ~

~
I >C >l
13:35
'
, ~ v
'='
. 16.05.2015

1H Facebook

TM

Mesaje primrte - ionicalu

C) Student Sign In

D 2013-2015 Oracle Acader

[ UO

C ~ I D ilea rning .o racle.com/ilearn/en/learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

><

--

1m
A

e Section 0 - CoUI'<e Resources

Section 7
(Answer all questions in this section)
41. Which of the following correctly defines overloading?

Mark for Review


( 1) Points

I!J.... Secbon 2 - tmng Allee 3


o Having more than one constructor with the same name but different arguments. (* )

I!J.... Section 3 - tmng Green foot

Having more than one constructor with different names and the same arguments.
A va1iable argument method that returns an array.
A type of access specifier that only allows access from inside the same class.

0 .. f) Java FundamentalsMidterm [
1!1..0 Secbon ~ - tmng Eclipse

1!1.. 0 Secbon 5 - U5\ng Control State


1!1.. 0 Section 6 - tmngArra'}5and

Correct

4 2. Which of the following could be a reason to return an object>

~lark

1!1..0 Section 7- tmng Recursion,


0 .... Appendix P:. Self Study GUide V
0 .. 0 Appendix P:. Self Study Guide V
0 .. 0 Appendix P:. Self Study GuideS
0 ..0 Appendix P:. Self Study Guide L

Correct

43. Which segment of code represents a correct way to call a variable argument method counter that takes in integers as its variable argument parameter>

Mark for Review


( 1) Points

0 .. 0 Appendix P:. Self Study GUide C


0 .. 0 Appendix P:. Self Study Guide II

counter(St>ing a, int b);


counter(int[] numbers);
o counter(!, 5, 8, 17, 11000005); (* )
counter("one","two",String[] nums);

0 .. 0 Appendix P:. Self Study Guide I'


0 ..0 Appendix P:. Self Study Guide C
0 .. 0 Appendix P:. Self Study GUide 1

0 .. 0 Appendix P:. Self Study GuideS


0 .. 0 Appendix P:. Self Study Guide I'

C01rect

44. Which of the following is the correct definition of a parameter?

Mark for Review


( 1) Points

0 ..0 Appendix P:. Self Study Guide II

A keyword that specifies accessibility of code.


A way to call a method with a va>iable number of arguments using an elipse.
A variable in a method declaration that gets passed into the method. (*)
A type of access specifier.
It is used to assign initial values to instance variables of a class; the structure is very similar to that of a method.

0 .. 0 Appendix P:. Self Study GUide~


0 .. 0 Appendix P:. Self Study Guide C

Incorrect. Refer to Section 7 Lesson 2.

45. Non-final static class variables should be private to prevent changes from other classes. True or false>
True (*)
False
~

...__
U<U
_'Y_
._

Mark for Review


( 1) Points

Correct

SnapShot: p rintscreen

~ x

The screen shot has succesfully been saved to disk

~~~~~~~~~~~~~~~~~~

for Review
( 1) Points

Because you wish to be able to use that object inside of the method.
It has faster pe>formance than returning a primitive type.
The method makes changes to the object and you wish to continue to use the updated object outside of the method. (* )
None of the above. It is not possible to return an object.

0 Java Ftmdamentats Fmal Exa

'l'

Review your answers, feedback, and question scores below. An aste>isk (*) indicates a correct answer.

8 Section 1 ~ 'Welcome and lntlu.

. ...

...
35

~~~ert
~:~Ja~v~a~F~u~l~
l d~~~~~~
~~~l~s~f~il~l~
~~
~~------------------------------------------------------------------------------------------------------------------~

EJ... () 2013-201 5 Oracle kademy Em:ll'


I!J...

Outline

1:

._ . _- _UU
______

RO ~

. ~
I >C >l
13:35
'
, ~ v
'='
. 16.05.2015

1H Facebook

TM

M esaj e primrte - ionicalu

C)

Studen t Sign

In

D 2013-2015 Oracle Acader

[ UO

C ~ I D ilea rning .o racle.com/ilearn/en/learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

><

0
?

--

1m
A

Review your answers, feedback, and question scores below. An aste>isk (*) indicates a correct answer.

e Section 0 - CoUI'<e Resources

8 Section 1 ~ 'Welcome and lntlu.

Section 7
(Answer all questions in this section)

46. A static variable is always publicly available. True or false?

Mark for Review


( 1) Points

I!J.... Secbon 2 - tmng Allee 3

True
False (*)

I!J.... Section 3 - tmng Green foot

0 .. f) Java Fundamentals Midterm [

1!1..0 Secbon ~ - tmng Eclipse


1!1.. 0 Secbon 5 - U5\ng Control State
1!1.. 0

...
35

~~~ert
~:~Ja~v~a~F~u~l~
l d~~~~~~
~~~l~s~f~il~l~
~~
~~------------------------------------------------------------------------------------------------------------------~

EJ... () 2013-201 5 Oracle kademy Em:ll'


I!J...

Outline

1:

Correct

47. Static classes can't return instances of the parent class when the parent class uses a private const>uctor. True or false?

~lark

for Review
( 1) Points

Section 6 - tmngArra'}5and

True
False (*)

1!1..0 Section 7- tmng Recursion,

0 Java Ftmdamentats Fmal Exa


0 .... Appendix P:. Self Study GUide V
0 .. 0 Appendix P:. Self Study Guide V

48. If an abstract class does not have implemented constructors or methods, it should be implemented as an interface instead. True or false?

0 .. 0 Appendix P:. Self Study GuideS

Mark for Review


( 1) Points

True (*)
False

0 ..0 Appendix P:. Self Study Guide L


0 .. 0 Appendix P:. Self Study GUide C
0 .. 0 Appendix P:. Self Study Guide II

Incorrect. Refer to Section 7 Lesson 3.

C01rect

49. Would this code be co>rect if a Dog is a HousePet? Why or Why not?

Mark for Review


( 1) Points

0 .. 0 Appendix P:. Self Study Guide I'


0 ..0 Appendix P:. Self Study Guide C

HousePet Scooby

Yes, because it is an abstract class.


Yes, because polymorphism allows this since Dog is a subclass of HousePet. (*)
No, because ref must be declared either a HousePet or a Dog, but not both.
Maybe. There is no way to tell without seeing the methods for Dog and the methods for HousePet.

0 .. 0 Appendix P:. Self Study GUide 1


0 .. 0 Appendix P:. Self Study GuideS
0 .. 0 Appendix P:. Self Study Guide I'

0 ..0 Appendix P:. Self Study Guide II


0 .. 0 Appendix P:. Self Study GUide~
0 .. 0 Appendix P:. Self Study Guide C

= new Dog();

Correct

50. Consider the following method of the class Test:

Mark for Review


( 1) Points

public static List returnlist(List list)


{
return list;
}
Which of the following program segments in Test's client class will compile with no errors?

. ...
';!

I. List nums = new Arraylist();


nums = Test.returnlist(nums);
II. A>raylist nums = new Arraylist();
( Ill l
Ill
""I

__

~~~~~~~~~~~~~~~~~~~~~~
- ~~~~~~~~-R
o_'""'
~s~
,....
~
. -.,.~~
G
~I"
-.~
.,
~,C,,~~
13
:3_
5 _'

...__
ueo
_'9_
'

- -

._ . _- _um_ _ _ _ _ _j

'='

16.05.2015

1H Facebook

TM

Mesaj e primrte ionicalu

D Student Sign In

D 2013-2015 Oracle Acader

[ UO

C ~ I D ilea rning .o racle.com/ilearn/en/ learner/jsp/playerJsp ?rco_id = 1340353197 &classroom_id = 1361817065&scorm_attem pt= 143176954275S&sessionld =4256988481L

+~

20132015 Oracle Academy English Java Fundamentals- Student

Outline

1!1... e Section 0 CoUI'<e Resources


8 Section 1 ~ 'Welcome and lntlu.

...

48. If an abstract class does not have implemented constructors or methods, it should be implemented as an interface instead. True or false?

0 .. f) Java Fundamentals Midterm [

1!1..0 Secbon ~ tmng Eclipse

~tark

1m

for Review
( 1) Points

Correct

49. Would this code be correct if a Dog is a HousePet? Why or Why not?

1!1.. 0 Section 6 tmngArra'}5and

Mark for Review


( 1) Points

HousePet Scooby = new Dog();

1!1..0 Section 7 tmng Recursion,

Yes, because it is an abstract class.


Yes, because polymorphism allows this since Dog is a subclass of HousePet. (* )
No, because ref must be declared either a HousePet or a Dog, but not both.
Maybe. There is no way to tell without seeing the methods for Dog and the methods for HousePet.

0 Java Ftmdamentats Fmal Exa


0 .... Appendix P:. Self Study GUide V
0 .. 0 Appendix P:. Self Study Guide V

0 ..0 Appendix P:. Self Study Guide L

--

True (*)
False

1!1.... Section 3 tmng Green foot

0 .. 0 Appendix P:. Self Study GuideS

Incorrect. Refer to Section 7 Lesson 3.

2 . tmngAlJCe 3

1!1.. 0 Secbon 5 U5\ng Control State

35

True
False (*)

EJ... () 20132015 Oracle kademy Em:ll'

1!1.... -

Outline

1:

Correct

50. Consider the following method of the class Test:

~lark

public static List retumlist(List list)


{
return list;
}

0 .. 0 Appendix P:. Self Study GUide C


0 .. 0 Appendix P:. Self Study Guide II
0 .. 0 Appendix P:. Self Study Guide I'

for Review
(1) Points

0 ..0 Appendix P:. Self Study Guide C

Which of the following program segments in Test's client class will compile with no errors?

0 .. 0 Appendix P:. Self Study GUide 1


0 .. 0 Appendix P:. Self Study GuideS

I. List nums = new Arraylist();


nums = Test.returnlist(nums);
II. Arraylist nums = new Arraylist();
nums = Test.returnlist(nums);
III. Arraylist numsl = new Arraylist();
List nums2 = Test.returnlist(nums1);

0 .. 0 Appendix P:. Self Study Guide I'


0 ..0 Appendix P:. Self Study Guide II
0 .. 0 Appendix P:. Self Study GUide~
0 .. 0 Appendix P:. Self Study Guide C

I only
I and III (* )
II only
II and III
I, II, and III
~

Previous

' ...

'l'

Correct

I Page 10 of 10 I Summary I

~ x

The screen shot has succesfully been saved to disk

~~---------------~

SnapShot: p rintscreen

...__
U<U
_'Y_
._

._ . _ _UU
_

_____

RO ~

. ~
I >C >l
13:35
'
, ~ v
'='
. 16.05.2015

Potrebbero piacerti anche