Sunil Kumar

Ranch Hand
+ Follow
since Apr 24, 2007
Merit badge: grant badges
For More
India
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sunil Kumar

Do you have an account on wordpress or anywhere else which I can add to the post for credits?

Knute Snortum wrote:Here's how I rewrote the first three sentences of your book review, FWIW:

you wrote:It starts with Dagny Taggart who is the Operating Vice President of Taggart Transcontinental, a giant railroad company originally pioneered by her grandfather, attempts to keep the company alive during difficult economic times marked by collectivism and statism.

While Dagny runs the company from behind the scenes, her brother, James Taggart, the railroad’s President, is peripherally aware of the company’s troubles, but will not make any difficult choices, preferring to avoid responsibility for any actions while watching his company go under.

He seems to make irrational decisions, such as preferring to buy steel from Orren Boyle’s Associated Steel, rather than Hank Rearden’s Rearden Steel, despite the former continually delaying delivery of vital rail.


Here's what I came up with:

I wrote:As Operating Vice President, Dagny Taggart attempts to keep Taggart Transcontinental, a giant railroad company originally pioneered by her grandfather, alive during difficult economic times marked by collectivism and statism.

While Dagny runs the railroad from behind the scenes, her brother and company President James Taggart, peripherally aware of the railroad's troubles, will not make the difficult choices needed to keep the company from going under, preferring instead to avoid any responsibility for his actions.

His decisions seem irrational, preferring to buy steel from Orren Boyle’s Associated Steel rather than Hank Rearden’s Rearden Steel, despite the former continually delaying delivery of vital rail.


This is simply awesome. Let me incorporate these and similar changes into my other posts.
Thanks a ton Knute Snortum
Great, thanks a lot Jeanne. Any suggestions for the puzzles part? or anything overall?
I recently re-started blogging puzzles, facts and writing book summaries. Can someone please review my website and most recent book review?
Atlas Shrugged by Ayn Rand
Think Witty
I recently re-started blogging and writing book summaries. Can you someone please review my website and most recent book review?
Atlas Shrugged by Ayn Rand

https://thinkwitty.com
There are couple of problems in your code.
1. you are "calling" the constructor and providing data types for the variables, that looks like you wanted to define the constructor, which you cannot do. Dont use data types.
2. At line 11.

i guess you places ";" accidently. This is like creating constructor without body. Then line 12 will be considered as a statement where "year" is yet not defined

3. super can only be called in first line of the constructor because
super() is called implicitly in any constructor of a class at the first line. For example in a class Test.java

is equivalent to


Hence to override, you need to call your super constructor in the first line of the constructor.
13 years ago
Yes, right David. https://coderanch.com/t/361567/Servlets/java/load-startup-tag-Vs-listener will help differentiate amongst the two as i said above.
Thanks David.
13 years ago
Rather than servlet use listener. Read the comment from Ben Souther
https://coderanch.com/t/361567/Servlets/java/load-startup-tag-Vs-listener
13 years ago
In a web application, people typically do this in servlet and load that servlet on startup using web.xml like


13 years ago
So is the problem with line number 9 i.e. remove the semicolon
13 years ago
Yup something like... Consider A as smaller to B than B as smaller to A.
Just like your sort order changes when you come to know that the numbers your are looking at in the school are not the marks but the rank.
13 years ago
You have quiet a few problems here
Line 32 : You are iterating on the string array(of length 13) using the length of corresponding element of the array(38). Clearly, when you reach at 13 on str_data[z], it will throw ArrayIndexOutOfBounds
You can fix the above by using str_data.length, but your code piece wouldnt return the desired results. You need to work more on it. I wouldnt want to mention the problems until you give it a try.
13 years ago
Any stack trace.. line number of error?? anything... Provide some info.
From what i see, you are trying to instantiate ColorAction using (String, ImageIcon) as parameters while your constructor needs 3 (String, Icon, Color)
If ImageIcon is a subclass of Icon, you can still instantiate using (String, ImageIcon, Color). Main point to note is.. the number of arguments should be correct
14 years ago
You should use return statement only if you need it. Dont do it just for the sake of doing it. I mean why dont you call the method in the next line?
14 years ago
"Current inventory is: " + myInventory.inventory()
To concatenate both the values should be string [or have toString i.e. convertible to string] . myInventory.inventory() is of return type void => which is the Root cause of error, you cannot add "void" to anything. Moreover, its a compile time error.
I dont know what did you want to achieve by appending a method returning nothing, it is anyways useless. If you just want to execute the method, do it in the next line. The question is "Why appending to a string?"

Also if you remove void, you will obviously need to specify some return type to the method and then return something of that type from the method.
14 years ago