Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

Raja Narasimha

Ranch Hand
+ Follow
since Nov 28, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
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 Raja Narasimha

Dear Paul, I did not dump anything here..Before I post any question, I spend 2 hours on Google and this forum. Do you think I am dumping questions without any effort ? If you think so, I do not post anymore questions and leave this forum quitely. You are big guy(Bartender) and do not want to go against you.
hi, What happened to ++ at Line #11. Is it abandoned ? I don't see the effect of it..
Hi, I am getting incorrect output. Please see the comment at Line 5.
Right Abimaran. Now, we pointed to new object at Line 11 and assigned a new value to it at Line 12.
Hi Prasad, In this program we are passing byte variables at Line 13 which means Line 3 should be executed know ?
Hi, Please let me know why "99" is printing at Line 22 instead of "420" even though we assigned a value of 420 to test1Ref.num Line 12
Hi, Please let me know why I am getting the compiler error as given below. I am expecting method at Line # 3 should be invoked
There should be some strong concrete reason because "Java" is created by Human beings. So, I believe that every question that we discuss in this Java forum has a very well valid reason. Hence, Please do not mislead others.
Coming back to the requested information, Because "num" variable is of primitive int type, any changes that you make at Line 11 should not be in scope once method at Line 14 is completed. Please let me know if my assumption is wrong.
Yes. In your program is guanteed to execute, so you will get the error if you write any statement after that.

In my code, Lines 1-4 is guaranteed to execute and we are returning out of the method at Line 3. How can we return again at Line 5. It should not make any sense whether it is executed or not. Please let me know I am assuming that the above 5 lines of code can be written as given below but this gives error
Hi, Why "420" prints at Line 22 instead of "99" ?
Hi, What I am trying to ask is, Line# 5 is guaranteed to execute. As soon as the control finishes executing Line 5, Control should come out of the method. My question is why it should not be "Unreachable code" instead of "Dead Code" ? Hi Abimaran, one of your links says "Unreachable code is sometimes also called dead code" which is confusing me more.

Abimaran Kugathasan wrote:Check the difference between Dead code and Unreachable code.

Hi, Why I am getting compile warning as given in the comments.
I am getting only compile Warning. Are you referring warning or Error ?
Thanks Prasad. This makes sense.

Prasad Kharkar wrote:Another thing is that suppose you extend an abstract class and some concrete class extends that abstract class
so when we are calling the concrete class constructor, it will call its superclass constructor as per the rule
and hence it is mandatory for any class to have constructor


happy to help

Hi, I am sure that we can create constructors in an abstract class. But, Why it should have constructor because it is not concrete class. What purpose it would solve ?