jwenting 1,905 duckman Team Colleague

Visual J++ hasn't been updated for about 5 years or more AFAIK.
It uses a 1.1.6 (maybe 1.1.7) compliant compiler, current version is 1.5.0.01

jwenting 1,905 duckman Team Colleague

52% to pass.

Sorry, you have to sign a non disclosure agreement before taking the exam about not mentioning the questions.

jwenting 1,905 duckman Team Colleague

I use Java professionally so no flashy stuff but solid corporate applications (mainly internet and intranet stuff for customers including several multinationals).
Most of it is confidential and the rest no longer exists as the projects were cancelled or the companies taken over.

jwenting 1,905 duckman Team Colleague

The IO package is not on the exam.

Passed it today with 87%, yoohoo!

jwenting 1,905 duckman Team Colleague

I should have cited this, its from java.sun.com. So i doubt this is incorrect

http://java.sun.com/docs/books/tutorial/java/javaOO/arguments.html

Besides that, I agree with everything else you say Narue.

And where does that state that Java is pass by reference?
In fact it specifically states that Java uses pass by value exclusively...

jwenting 1,905 duckman Team Colleague

>>However, do you really know what that means?
>Yes, yes I do.
And so do I :)


>>you can say objects are passes by reference, since it invokes differently than with primitive types.
>Doing so is anything but safe because the misunderstanding creates a nasty and common pitfall. That's what happens when you try to make things simpler by sacrificing accuracy.

Correct. If it were pass by reference you could change the actual reference inside the calling method and not just the content of the referenced object.
This code

void method1()
{
  SomeThing a = new SomeThing(1);
  method2(a);
  a.printSomething();
}

void method2(SomeThing s)
{
  s = new SomeThing(2);
}

....

class SomeThing
{
   int something;
   public SomeThing(int s) { something = s; }
   public void printSomething() { System.out.println(something); }
   public void setSomething(int s) { something = s; }
}

would print 2 if Java were pass by reference, when in fact it prints 1.

jwenting 1,905 duckman Team Colleague

Oh, it would be an excellent project. In that I was serious.
But I seriously (so I was serious in another respect too :) ) don't think he could pull that off so the suggestion of the project was sarcastic ;)

jwenting 1,905 duckman Team Colleague

There is no way to force a thread to stop, and for good reasons as doing so could leave the entire application in an unpredictable state.

The standard means is to have a public function in the Runnable instance used by the thread which sets some flag.
The run method at one or more places (usually as a loop condition for an otherwise eternal loop) checks whether that flag is set and if it is terminates the loop which in turn ends the run method which causes the thread to terminate gracefully.

jwenting 1,905 duckman Team Colleague

Java ALWAYS uses pass by value, so your question makes no sense.

Maybe you THINK objects are passed by reference but they aren't. What's passed are references to objects and these are passed by value.

jwenting 1,905 duckman Team Colleague

Tried FF. Too many problems in the CSS and JS handling.

jwenting 1,905 duckman Team Colleague

I think C++ (like me) was being sarcastic :)

jwenting 1,905 duckman Team Colleague

Line noise?
Connect the line out from the audio deck to the line in for your soundcard.

jwenting 1,905 duckman Team Colleague

Sure it would be a good start, but as he wants to make a new language it's not what he's looking for :)

Maybe he should look at Jython instead when looking at a language implementation in Java, which is a port of the Python compiler to Java (and they're in need of people as the project is really slow at the moment :)

jwenting 1,905 duckman Team Colleague

A common mistake is for people to expect replaceAll to literally replace all occurrances one string with another, but that's not what it does!
replaceAll() uses a regular expression to determine what to replace. If the string you're giving it as the pattern to replace doesn't compile to what you think it does it will give unexpected results.

jwenting 1,905 duckman Team Colleague

You should separate display logic from business logic anyway.
Your entire application is butt ugly, one big block of spaghetti code.

Use proper OO design. And use proper Java class and method naming...

Maybe you should first learn Java before trying to write your own language?

jwenting 1,905 duckman Team Colleague

I've I think 2 permanent forwarding addresses at sites I'm a paying member of.

The term "I think" should tell enough, I never use either of them.
Maybe the fact that I run my own mailserver has something to do with it but in my experience the only people who such services are really useful for are those connected to ISPs that don't offer email accounts at all (if such still exist).

jwenting 1,905 duckman Team Colleague

AspectJ isn't so much a new language as an addon API to an existing language.

Designing an entirely new language is indeed a very tough task. You should first try to make interpreters and compilers for some existing languages, then start writing and revising a design document for your own language.
When you have that, create a formal language specification.
Only then should you start building first interpreters and then maybe compilers for it.

Plan on taking a year or more before you write the first line of code on that interpreter, probably 18 months at least before you execute the first line of code written in your new language.

And that's if you have a lot of experience in software design and computer science theory.

jwenting 1,905 duckman Team Colleague

It's all about how you use it.
Sites that include meta tags (or hidden text within the page itself) with hundreds or thousands of target words just to get rated in a lot of categories are clearly unethical.

Just making a good design is fine, in fact it's crucial for the user experience as well.
Personally if a site uses a lot of flash I don't come back, and neither will most spiders.
Same with easy URLs and shallow site architecture. Those help not just spiders but (and that's far more important) they help humans as well.

If you need to resort to explicitly do things that have no benefit to human users in order to get those users to appear at all (so, getting your site spidered into places it shouldn't be) you'd better rethink your site (and maybe should just take it down).

jwenting 1,905 duckman Team Colleague

.NET is not a ripoff of Java just as Java is not a ripoff of C++.
.NET is a logical progression from the existing COM+ technology which itself is a development of older ActiveX technology the predecessors of which existed over 10 years ago.

Java didn't invent the concept of a virtual machine, nor did it invent garbage collection. Both had been in existence in other products for a long time.
What Java did was popularise these technologies.

Java isn't the wave of the future, it's the wave of today.
What the future will bring is unknown, most likely it will be Cobol though.

jwenting 1,905 duckman Team Colleague

What about a spellchecker with automatic correction of incorrect puntuation and capitalisation?

jwenting 1,905 duckman Team Colleague

You can use Oracle without ODBC, just use the class 4 JDBC driver which has far better performance and is platform independent.
You're not going to create DSNs from Java without using native code (thus JNI and a DLL), though maybe the Oracle ODBC bridge driver has some non-standard functionality to allow it (you'd have to check the documentation on the driver for that).

jwenting 1,905 duckman Team Colleague

Make the component that shows the time a self contained bean.
Create something that inherits from JPanel or JComponent and use that as your base, then display the time on there.
Give it a thread that updates the component, then goes to sleep for a while (a second would be logical, but you might want an update interval a bit longer to save system resources and display only minutes).

You can then just drop that component into your application and it should work (and it should work in any application...).

Initialise the thread when you initialise the canvas on which the time is to be displayed and it will immediately start working.

The entire thing will be self contained, so no need for outside interference (as an extra feature you might want to have a way to retrieve the current time in the component and maybe some options to set fonts and colours for the display but that's eyecandy and not needed for core functionality so don't add those initially).

jwenting 1,905 duckman Team Colleague

what error, what button, what applet, what dispose method???

jwenting 1,905 duckman Team Colleague

An ArrayList isn't an array. It (nor Vector which you shouldn't use, it's there for legacy use only) has different mechanisms.

To retrieve an item from your List use the get(index) method.

Under Java 1.5 (5.0, Tiger) you should thus do the following:

ArrayList<Item> itemsList = new ArrayList<Item>();
...
Item anItem = new Item();
...
itemsList.add(anItem);
double amount = itemsList.get(0).getStartValue();

Under older versions it's a bit different but not fundamentally so.

jwenting 1,905 duckman Team Colleague

Out of state mailorder purchases in the US are not subject to salestax.
Online purchases at the moment count as mailorder (there are plans to change that).

The seller of course has to declare his income from the purchase towards his income taxes (there may be a lower limit for this).

EBay themselves act only as an intermediary, they don't charge any taxes. Nor do other auction houses (though some do handle government taxes for the buyer and seller, acting as a clearinghouse for those).

jwenting 1,905 duckman Team Colleague

Of course. I hope you use a model to contain your data and have your screens read the data to be shown from the model?
If so, just show the screen like you would from the toolbar or menu.
If not, it's time to rethink your application architecture.

jwenting 1,905 duckman Team Colleague

Get yourself to a decent bookstore and get some good books on HTML and JavaSCRIPT.
That (and experimenting) is the best way to learn.

jwenting 1,905 duckman Team Colleague

You should always use packages. It's not officially mandated by the JLS but in practice it's the only way to go.
For example you can not import a class that is not in a package from any class that is in a package. You can also not create instances of it (though there are ways to do so using reflection, but that's rather convoluted).

jwenting 1,905 duckman Team Colleague

use code tags.
What error are you getting?

jwenting 1,905 duckman Team Colleague

Not sure if it's what you're looking at, but maybe http://jakarta.apache.org/commons/sandbox/messenger/ can be of use.

jwenting 1,905 duckman Team Colleague

I guess you're looking at Java courses?
Sun has excellent ones. Available as classroom study, web based, or CD/Book format depending on course and your preferences.

jwenting 1,905 duckman Team Colleague

Failing once is OK maybe, but taking it again in short order when failing so miserably and then once more soon thereafter after failing the second try with just slightly better results is simply stupid.
That first very bad result should have told you that you needed a LOT more work. The second failure should have told you the same thing.

jwenting 1,905 duckman Team Colleague

untrue.
Java is all about packages.
Maybe the reason it cannot find the class is that you didn't put it in a package?
Default package (a.k.a. no package) is dangerous and should be avoided.

jwenting 1,905 duckman Team Colleague

I don't use it. In fact I've blocked the entire domain causing any mail from GMail accounts to be bounced.
If someone wants to send me email, send it from an account where Google doesn't harvest the entire message content including my contact information.

jwenting 1,905 duckman Team Colleague

nothing better than a good DECLARATION-SECTION

jwenting 1,905 duckman Team Colleague

lol, I was going to let him find that out when he posted in the java programming forum!

And I thought I was nasty :cheesy:

jwenting 1,905 duckman Team Colleague

Maybe another stupid idea: check that your RoboPlot class has a method with the exact signature required for a main method (i.e. public static void main(String[] args) ).

jwenting 1,905 duckman Team Colleague

instead of a nifty lapel pin you get a nifty graphic to put on your resume, letterhead, and businesscard.
Far more useful in the real world :)

C++, don't take the exam until you're well and truely prepared. As it is you're just wasting $150 every few months. Better spend $150 on books and take that exam after half a year of intense study and practice.

jwenting 1,905 duckman Team Colleague

A String is not an array of characters in Java (in this Java differs from for example C and Pascal).

The compiler is quite correct and extremely helpful in pointing out that you're trying to use a String as if it were an Array (yes, arrays are also objects).

jwenting 1,905 duckman Team Colleague

Good thinking. PHP is a Very Bad Thing, teaches poor programming practices, and therefore should be actively discouraged.
Maybe suspending the youthful delinquent is going too far, but he should be told to write "I will never use PHP again" 10.000 times by hand without corrections and turn it in as punishment and to set an example.

jwenting 1,905 duckman Team Colleague

Plus asking others to do your homework is seriously frowned upon. Just don't do it.

jwenting 1,905 duckman Team Colleague

Thanks. Going up on 09 March noonish (CET).

After SCJP I'm planning to do SCJD which is harder and maybe SCWCD as well.

The main reason the 1.4 exam is so hard is because many of the things being tested are rarely encountered in real life and therefore not general knowledge for even experienced developers.
It's also specifically designed to weed out people who just try to cram for the exam without ever having used Java in anger, apparently with some success :)

jwenting 1,905 duckman Team Colleague

If you used that simulator to fail twice it might be better to stay away from it...

Noone should get a score of 22% or 44% on the exam who knows the subject matter even glancingly.

Ghost commented: Rude and Arrogant +0
jwenting 1,905 duckman Team Colleague

A 12 or 13 year old got certified in India last year.

The only way to get certified is through hard work. Study, gain experience.
Just going out there hoping Sun will give you the certificate as a PR gesture (see, even a 12 year old kid can do it) is counterproductive.
Sun WANTS the exam to be hard and for good reason.
The results of too easy exams like MCSE can be seen all around. Where the certs are meant to tell companies the person holding them is good at his job MCSE has come to mean the exact opposite and there are now many companies who won't hire an MCSE holder on general principle.

I've been working in Java for 6 years professionally and fulltime and spent the last year or thereabouts studying specifically for the exam, and I now feel I'm ready.
I get 85% on average on practice exams, I'd not go for the real thing (2 weeks from now) if I'd not have this level of confidence.

jwenting 1,905 duckman Team Colleague

Use BorderLayout, not FlowLayout, for your main frame.
Then put the menu in TOP and the main content in CENTER (in which you may have to add JPanels with their own layout managers to get the effect you want).

jwenting 1,905 duckman Team Colleague

don't know JCreator. It probably uses an internal JVM which is likely an old(er) version.
There's also classpath issues to consider.

jwenting 1,905 duckman Team Colleague

properties consist of simple key-value pairs with 1 value per key.
You seem to want multiple values per key which is not directly supported.

There are ways around this but it would be far better to take another mechanism like XML to store your data.

jwenting 1,905 duckman Team Colleague

Or are you linking to a 3rd party library which may be missing something?

jwenting 1,905 duckman Team Colleague

same here. I find myself printing out articles on new tech for which I don't (yet) have books and reading the prints...

jwenting 1,905 duckman Team Colleague

A good flesh and blood teacher and contacts with other students can help a lot.
It keeps the interest alive and gives real people to exchange ideas with.

Most online courses don't have anything coming even close to that, they're just glorified tutorials.
The only benefits you get from them is that you can choose one that's offered by an institution that's not conveniently close to visit and that you can schedule to do them in your own time (which brings a very real danger of letting them slip for going to the pub or playing a game).