Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!

Tim Cooke

+ Follow
since Mar 28, 2008
Tim likes ...
Clojure IntelliJ IDE Java
Standard Nerd
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt Green check
expand Greenhorn Scavenger Hunt Green check

Recent posts by Tim Cooke

I'd be interested to hear how you get on with Spark. If you try it at all that is.

Spark wrote:A micro framework for creating web applications in Kotlin and Java 8 with minimal effort

Tag lines such as this make me nervous. In my previous experience of similarly pitched products it has turned out to be really handy at first getting set up very quickly, but frustration emerges when you want to do something outside of the prescribed 'modus operandi'. Then things get really hacky really quickly and the initial benefits are soon lost.
5 days ago
Almost certainly a test question.

Houna, for the purposes of copyright and correct attribution please state where you have copied this question from?
6 days ago
Might I suggest taking a step back even further and see whether an 'off the shelf' CMS would fit your requirements? Something like Joomla for instance?
6 days ago
In summary: You discovered that Array is not a valid Java type.

chamini prashakthi wrote:And I finally suggest it is better if there is a section on unit tests.It is something that developers must be awre of ...

We have a Testing Forum that is home to many Unit Test discussions.
6 days ago
Hello Suchita, welcome to the Ranch!

I expect after 9 years since the OP asked the question they have solved it or have long stopped caring about it.
1 week ago
What is the Array type? It doesn't look to be part of the standard Java library. Can you tell us what package that class belongs to?

Also, you say "It shows error" but you don't say what the error is?
1 week ago
I guess Chamini is talking about the Mockito feature ArgumentCaptor.

When you say "String array" you mean a String[] type? I haven't tried it myself, but in theory String[] is a descendant of Object so could work. Have you tried it? What did you discover?
1 week ago
Now you didn't mention that before. It is your company threatening legal action?

The legalities differ from country to country with regards to employment law, so you'd need to check your local laws, but in the UK where I live that sounds like 'unfair dismissal'. If you did not know about any wrongdoing on his part when you provided the reference, then as long as there are no other issues with using your company email to provide a reference, then I can't see what they have against you. Perhaps they have a policy against providing references using your company email?

What exactly are they threatening? What law are they claiming you have broken? Do they have any policies around providing references using company email?
1 week ago
I can't imagine there would be any formal action that can be taken against you, especially if you didn't know about him leaving without notice at that time. However, you might have lost a bit of credibility with the other company if they happen to find out. Ultimately, it's the responsibility of the other company to make up their own mind about employing him.
1 week ago
Can you explain what you mean by "got absconded"? A person can abscond, but they can't be absconded. It doesn't make sense.
1 week ago
Also, you'll find that demands such as "please reply as soon as possible" are counter-productive. Any urgency you have is yours and yours alone. We are all volunteers here and help people because it's fun and rewarding, as soon as the demands start then fun stops and so does the helping. The best approach is to ask your question and then be patient for a reply.
What you have there is an "initialiser block", see the Java Tutorial for Initializing Fields.

Any statements outside of a method or initialiser block is illegal syntax. What did you expect to happen?
You've changed things around a good bit. But that's ok.

employeeService.getEmployeeByUserName(userName) returns a single Employee which makes more sense than a List. But when you run your code does it actually return an Employee? or null?

When you get into the singleEmployeecsv.csv() method, what happens? You say "does not get values" but what exactly does that mean?
2 weeks ago