Win a copy of Spring Boot in Practice this week in the Spring forum!

Grady Jamyson

Ranch Hand
+ Follow
since Aug 04, 2002
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 Grady Jamyson

Hi guys, I have a question about the career path.
My background, more than 7 years programming experience,
two years experience in programming Java and four years in C#.
I also have been a system analyst for three years,
and I am familiar with OOAD and design pattern.

Currently, I am trying to find a new job,
but I found that it's difficult to persuade myself to try Java related job opportunities.
because the last time I wrote codes in Java was almost three years ago.
And I have little experience in Spring and Struts framework.
I know what the frameworks are and what they do, but my current job uses .NET,
so I have no chance to deploy then in production.

No matter search the programming position or software project management position in Java,
I am pretty sure lacking experience in popular frameworks will be a reason that
the company rejects me.
Or perhaps I will be questioned that I have not written Java codes for a long period.

So, should I stick to the .NET while finding jobs?
Or just give a try to Java related opportunities?

10 years ago
I am writing a web service client to pass a custom type to the server but get a error message,

[javax.xml.bind.JAXBException: class com.example.mypachage.WineData nor any of its super class is known to this context.]

The server side code is as following,

And the client code is as following,

Is there anything I need to know while using the custome type as parameter passing around web services?
14 years ago
I actually have the same question as you do. I have my own type in the server side, but I copy it into the client.

I can refer to the return type in the client code, but I have compiler error when building the client codes using Netbeans 6.1. I am still trying to figure it out.
14 years ago
It works, thanks a lot.
I don't know why the codes in that area have this kind of effect.
Would you recommend books or websites to study?

Thank you, again.
15 years ago
My code lists as below,
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.DateFormat" %>
<%@ page contentType = "text/html;charset=utf8" %>
Calendar rightNow = Calendar.getInstance();
Calendar comeDate = Calendar.getInstance();
comeDate.set(2007, 0, 14,22,00);
long diff = comeDate.getTimeInMillis() - rightNow.getTimeInMillis() ;
long second = diff / 1000;
long day = second / (60 * 60 * 24);
long hour = (second - (day * 60 * 60 * 24)) / (60 * 60);
<li>Today is:<%= rightNow.get(Calendar.YEAR) + "/" + rightNow.get(Calendar.MONTH) + "/" + rightNow.get(Calendar.DAY_OF_MONTH) %>
<li>The coming date:<%= DateFormat.getInstance().format(comeDate.getTime()) %> </li>
<li>Time left: <%= day %> day <%= hour%>hour <%= min %>min</li>

I don't think the problem is about browser's cache because I did clean the cache.
Either I restart Tomcat or I delete the compiled file can make this program work.

Thanks for reply.
15 years ago
I have an object using java.util.Calendar in jsp.
This object is to show a countdown days to a specific time.
(For example, how many days, hours, and minutes left to 2007/1/1.)

It works fine when I first get the page, but if I reload the page,
the left time doesn't change unless I restart tomcat.

I already set my application auto reload, but doing so only works
when I change my jsp code.

How do I solve this problem?
Thank you.
15 years ago
Hi there,
I passed SCJP 1.4 when I developed J2EE programs three years ago. Later, I haven't written any systems using Java about one and half year. Now, I am thinking to take other Java Certification but not sure where to start. Since there is new Java version 5.0 test, should I take this one first to update my knowledge? Or take SCBCD or SCWCD and skip SCJP 5.0?
Thanks for any advice.
15 years ago
"Why should the number of use cases match the number of activities?"
This is the question I want to know.

I have the same opinion "a use case actually composed of a number of actions" with you.
That is also I wnat to do.

But my friend doesn't think so.
If I draw them as he wants, I think I just draw the use cases with sequence, but not describe the flow of the use cases.
Let me describe the story again.

I want to buy materals to make products. So, I write a form to apply materials.
A manager might receive a lot of forms a day.
He must approve or reject the forms he received by the content of forms. (agree to buy the materials or disagree to buy with some reasons)
Also, he could review the status of all the forms he has received.

So, I draw three use cases "review forms", "approve forms", "reject forms" for the manager I described.

Then, I add "select forms" action in activity diagram.
I want to use an activity diagram as the flow chart.
I think, after the manager selected forms, (here is a fork) he might "approve forms" or "reject forms", (here is a join) then he could "review forms".

My friend said,
1. use case "reject forms" should have extend relationship with use case "approve forms", because they are the same action with diffenet results by the manager decision.
2. "select forms" action in the activity diagram should be added in the use case diagrma, because there are four actions in activity diagram, but three use cases in use case diagram.
=>just like Stan said, "I think every "User does x" statement in the use case had to be an activity diagram".
So, what you have in an activity diagram should mapped in a use case diagram.

Thanks a lot.
I have following questions about use case diagram.

1. If a manager could receive forms and select forms to review, to audit, to send them back. Do I need to draw "select forms" use case or "receive forms" use case?

2. When a manager receives forms, he could either audit the form or send it back.
I draw two independent use cases for a manager, "audit a form" and "send back a from". But my friend said, "send back a form" should have "extend relationship" with "audit a form".
Which one is right?

3. When I draw activity diagrams, my friend said the number of use cases in use case diagrams must be exactly the same as actions in activity diagram.
i.e., if I have four use cases for the manager described above,
I could only have (and must have) 4 action in activety diagrams. Is that opinion correct?

4. Is there any (sort of standerd) procedure or sequence when I draw UML? For example, I have to draw use cases diagrams firstly, then draw activity diagram secondly...etc.

Thanks a lot.
[ February 28, 2005: Message edited by: Grady Jamyson ]
Which of the following statements are true in terms of the java.lang.Math.abs method?

a. Four overloaded versions of abs exist.
b. An ArithmeticException is declared in the throws clause.
c. The type of the return value depends on the argument type.
d. The returned value is always of a floating-point primitive type.
e. If the argument is a negative integral value, then the returned value is always positive.
f. If the argument is positive, then the argument is returned.

the answers are: a,c,f
But I think e could be true.
Why e is not one of answers?


What is the result of attempting to compile and run the program?

a. Prints: 1,1
b. Prints: 1,3
c. Prints: 3,1
d. Prints: 3,3
e. Run-time error
f. Compile-time error
g. None of the above

answer: c

I thought mehtod m1 could not change the local variables values,
But the answer is C.
I'm confused. Any ideas?
Thank you.
Thank you, guys.
I'm quite clear how it works after you two explained.

I think,

1) a = true is evaluated, so a = true
2) b = true is not evaluated, so b = false (short-circuit)
3) the original expresion would be, boolean x = true && (c = true)
4) c = true is evaluated, so c = true
5) boolean x = true

But the answer is, a = true, b = false, c = false
Any ideas?
Thanks a lot.

Which statements are true?

a. If assertions are not enabled at run time it prints an error message.
b. If assertions are not enabled at run time it prints nothing.
c. With assertions enabled it prints an error message.
d. With assertions enabled it prints nothing.
e. The assert statement is being used to check a class invariant--something that must be true about each instance of the class.
f. The assert statements are being used to check a precondition--something that must be true when the method is invoked.

answers: b,d,e
My question is, why "e" is one of the answer?
And what does class "invariant" mean?

Which statements are true?

a. With assertions enabled it prints an error message.
b. With assertions enabled it prints: true,true,false
c. With assertions disabled it prints an error message.
d. With assertions disabled it prints: true,true,false
e. With assertions disabled it prints nothing.
f. The combination of the if/else statements and the assert statement indicate that the programmer expects no more than one boolean, b1, b2 or b3, to be true.
g. The assert statement is being used to check a precondition--something that must be true when the method begins.
h. The assert statement is being used to check an internal invariant--something that the programmer assumes to be true at a particular point in the program.

answers: a,d,f,h
My question is, the answer "f",how do we know what programmer expect?

Thans a lot.

([C0DE][/C0DE] tags added)
[ August 26, 2004: Message edited by: Barry Gaunt ]