• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JQplus

 
Vivek Shrivastava
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are right. I trie and it is working with line 0
- Cheers
 
thomas
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, line 0 is the only one that can be inserted.
 
Vivek Shrivastava
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NO thomas ,
I think we can insert line #3 (\\3). feel free to creect me.
vivek
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
//0 and //3 can be inserted.//3 can be inserted since
it is protected.
 
Rajesh Gupta
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only //0 can be inserted //3 cannot be inserted because ;is missing in the statement after i++.Any more suggestions.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajesh gupta is right. If there is a semicolon after i++, then
//0 and //3 can be inserted.
Regards
VR
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic