aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes more tiger questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "more tiger questions" Watch "more tiger questions" New topic
Author

more tiger questions

Zak Guesmia
Greenhorn

Joined: May 28, 2004
Posts: 21
Q17 : what would be the output of this program? (Choose One)

a) one two one two
b) one one one two
c) one two one one
d) the program won't compile
e) none of the above

Q18 : what would be the output of this program? (Choose One)

a) 15 138 15 138
b) 15 138 0 0
c) 0 0 0 0
d) 0 0 15 138
e) the program won't compile

Q19: Given the following chunk of code, select two correct statement

a) the code compiles successfully
b) the would compile if you parametrize myIntList, to be "List<int[]> myIntList" in Line 2
c) the would compile if you de-parametrize floatNumbers, to be "List floatNumbers" in Line 8
d) the code would compile if you substitute "float i : floatNumbers" in Line 12 by "Float i : floatNumbers"
e) the code would compile if you substitute "Integer i : myIntList" in Line 4 by "int i : myIntList"
f) the code would compile if you substitute "Integer i : myIntList" in Line 4 by "Object i : myIntList"
g) none of the above


Q20: Given the following code, select the correct statement

a) the code compiles successfully
b) ClassCastException
c) IllegalFormatConversionException
d) the program would compile if you decalare ShowWinners as abstract
e)the code doesnt compile because asList(int...) is not defined in java.util.Arrays
f) none of the above

Q21 : Choose the correct answer.

a) The code compiles successfully.
b) the code doesnt compile bc Iterable is not part of java.util
c) the code would compile if TextFile doesnt implement Iterable
d) the code would compile if you replace BuffredReader by InputStreamReader
e) none of the above

Refer to the 16 previous questions on the thread :
---------------------------------------------------------
mock questions


( tags added)
[ January 10, 2005: Message edited by: Barry Gaunt ]

SCJP1.4, SCWCD1.4, SCBCD1.3, SCDJWS, SCEA(part1), MCP, MCAD.NET, SCJP 5.0 (beta)
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919



Shouldn't the output be

15 138 138 0
?


Groovy
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
The output is indeed 15 138 138 0. But I guess the following line has a typo:

numbers[0]= 138;

It should be:

numbers[1] = 138;

Then you get 15 138 15 138 (option a).


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Zachariah

Good work. Keep them coming.
Zak Guesmia
Greenhorn

Joined: May 28, 2004
Posts: 21
Hi all beta testers,

Everybody has to contribute i cannot afford covering all the objectives by myself.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

19 : f
20 : f
21:e
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1844

17)one two one one
18)15 138 138 0


Krishna Srinivasan
Spring Tutorials, OCAJP Mock Questions, 400+ OCPJP Mock Questions
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1844


Hi all beta testers,

Everybody has to contribute i cannot afford covering all the objectives by myself.


here one.

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

1
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1844

few more questions


Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1844

Here you can find the sample chapter for varargs,

Varargs in Tiger
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Answres

2
1
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1844

Yes.

Varargs can be only the final paramter of a method.

(String... arg1, String str) - not a valid method declaration.
it can be like this : (String str,String... arg)



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: more tiger questions