This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!

Vidmantas Maskoliunas

+ Follow
since Nov 16, 2009
Working at IBM (Lithuania), looking for a job in NZ/AU.
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
expand Greenhorn Scavenger Hunt

Recent posts by Vidmantas Maskoliunas

Perfect score, greetings!
10 years ago
Hi, Jad,

I remember that Deitel&Deitel book "Advanced Java 2 Platform How to Program" had some examples of using CORBA. You can try to find that book (e- or paper-).

Good luck
10 years ago

if you can call the "javac" command then check if the .../bin contains java.exe as well.

Also, give us the error message that appears when you try to call java from the directory other than containing .class files.

Probably you mean "I can call java, but it does not execute my program", right?

If yes, then you need to check the package of the class that you are trying to pass as parameter. If it lies in default package (i.e. no package is set explicitly), then yes -- you cannot execute it from any outside directory.

But for example, put the class into "" package (declare "package" in the source code) and have the following directory structure with the compiled classfile:

You will need to call the java command from C:\mycode by typing the following command line

Does it work?
10 years ago
Hello, Colleagues,

The situation:
a company declares its best sentiments for agility, quick and collaborative work and drums that scrum is widely used (in our team it is, or at least some practices of Scrum like sprint planning, daily meetings and sprint backlogs).
Now a manager suddenly asks to start monitoring deliveries to all levels of environments (development/test/verification/integration/acceptance/production). Each delivery action have to be described in a spreadsheet with all related information (date/component/what's new/dislocation of code in SCM etc). There are days full of delivering to the development server, so in my opinion that clearly contradicts the spirit of agility (assume that making a new journal entry takes 10-15 minutes). A good SCM is used properly, so people put their comments about changes together with code check-ins.

What do you think about that? Is it reasonable to extensively maintain changes in all environments or, let's say, acceptance/production is enough?

What is your experience here?

Thank you for all ideas.
Another interesting approach is to use java.util.TreeSet<Integer> API. But that may be an overhead.
10 years ago
Dejan Miller > In a typical case Garbage collector should not do that. See about String Pools

avi sinha > Good shot, you have a sharp eye! I think to continue the discussion, we should replace append with concat
The best thing that you did -- it's not the right time to worry about the score
10 years ago
Greetings, Colleague!
10 years ago
Hi, here could be also a "string pool" effect in the game. I.e. string literals are not vanished after using them, and despite the fact that the string literal has no reference pointing to it, it still remains in the memory.
I think Lorand Komaromi gave a good hint for that -- so the overall threading routine could look like following:

current thread owns stack1, the new thread will own stack2, they both share the same heap

Runnable rr = ... // variable rr lying on stack1 gets a reference to the object lying on heap which contains the method "run"
Thread t = new Thread(rr, "SomeName"); // variable t lying on stack1 gets a reference to the newly created thread object. The thread inside has a reference to the instance of object with "run" method, and that object lies on heap (not stack1 nor stack2)
t.start(); // the JVM starts new thread of execution, and executes the method of the object lying on heap.

So, answers could be (in my opinion):

Thread t= Thread.currentThread();
//does this statement implies that we passing the address of stack pointer of current stack frame of seprate call of stack in t?
"Correct me if i am wrong"?

This line of code assigns t with a reference to the Thread object representing the current thread of execution. It is the reference to the object lying on common heap.

t = new Thread
(Runnable threadob,"threadname");//since threadob only have acess to run function extend in class that implements runnalbe interface,so we passing the address of that run function in thread t,which define where execution of thread ll begin?

In this case, we are not passing the address of function (method), but reference to the heap where instance of Runnable exists (actually instance of some object implementing Runnable, but who cares...). The thread of execution will take this object from heap and executes it's run method.

I make a guess that you have been a programmer of C/C++/Delphi, haven't been?
I don't know if that helps, but actual objects live on the heap... So references point to the common heap for all threads rather than stack, that should solve the contradiction, in my opinion.
Dave, congratulations! And thank you for the extensive description of the exam. By the way, now I can start comparing the real probability of questions -- it's very extreme. For instance, you got even 8 questions with ENUMS while I didn't get any.

Good luck with the next challenge!
10 years ago
Oh yes, when I was in preparation for SCJP, I also looked at the change of SCJP 6 "Much more questions will have the choice 'compilation fails'". But that was ok, and they were not too complex
10 years ago