Vipul Prajapati

Greenhorn
+ Follow
since Aug 29, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vipul Prajapati

And be clear about the "continue" statement it will go at the end of the loop not the beginning of the loop in which it is declared.

For the precise meaning of "continue" keyword please refer following link:

Java Glossary
Or You can use DEBUGGING facility of any IDE to trace the flow of your program.
[ November 06, 2008: Message edited by: Vipul Prajapati ]
Hi Ganesh,

"continue" is used to resume program execution at the end of the current loop body. If followed by a label, continue resumes execution at the end of the enclosing labeled loop body.

After the execution of "continue" statement, the control will be passed at the end of the LOOP. In this case the loop structure used is do-while, so it'll go at the and of the do-while loop and it will execute while statement.
[ November 05, 2008: Message edited by: Vipul Prajapati ]
According to the question the answer would be A only.
Try to compile this code it'll give an error of "Cannot reduce the visibilty of the inherited method".
[ October 20, 2008: Message edited by: Vipul Prajapati ]
Why can't the Parent class access its own members even if we access it by using its own instance?

It has rights to access its members.

Comments?
@Panseer

You told that whatever is your reference, it can refer to only that class's members only, even though it's referring to any sub class's object, right?

Now, see this code..



"h.print()" this statement should print HELLO FROM D...<BR>, but that's not the case everytime.

Your views will help me in clearing my doubts.

Thanks,
By seeing at your 1st code...I can say that you can't narrow caste Double to an Integer and for the Double argument there's no such method is defined in code 1...so it'll definitely give a compile time error..."Cannot find symbol"...

Any corrections?
Does it check for the return type in overloading methods?