aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes JQplus 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 "JQplus" Watch "JQplus" New topic
Author

JQplus

Vivek Shrivastava
Ranch Hand

Joined: Jun 03, 2000
Posts: 277
Hi,
This is from Jqplus mock exam.
Given the following source code, which of the lines that are commented out may be
reinserted without introducing errors?


I think we can insert line # 0 ( //(0)) because we are already overrinding it in BigBang class but it is not one of the answer.

please do verify it.

vivek
Doit
Ranch Hand

Joined: Aug 03, 2000
Posts: 169
I think you are right. I trie and it is working with line 0
- Cheers
thomas
Ranch Hand

Joined: May 26, 2002
Posts: 79
In fact, line 0 is the only one that can be inserted.
Vivek Shrivastava
Ranch Hand

Joined: Jun 03, 2000
Posts: 277
NO thomas ,
I think we can insert line #3 (\\3). feel free to creect me.
vivek
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
//0 and //3 can be inserted.//3 can be inserted since
it is protected.
Rajesh Gupta
Greenhorn

Joined: Jun 21, 2000
Posts: 20
Only //0 can be inserted //3 cannot be inserted because ;is missing in the statement after i++.Any more suggestions.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Rajesh gupta is right. If there is a semicolon after i++, then
//0 and //3 can be inserted.
Regards
VR
 
 
subject: JQplus