an article on unicode
While doing some research on unicode and Java, I ran across a reference to this article on basics. The opening is quite funny, so I'm looking forward to reading it.
Labels: internationalization, java, unicode
Geeky reflections
While doing some research on unicode and Java, I ran across a reference to this article on basics. The opening is quite funny, so I'm looking forward to reading it.
Labels: internationalization, java, unicode
The Java Tutorials > Essential Classes > Concurrency > Processes and Threads
A process has a self-contained execution environment. A process generally has a complete, private set of basic run-time resources; in particular, each process has its own memory space.
...
Threads are sometimes called lightweight processes. Both processes and threads provide an execution environment, but creating a new thread requires fewer resources than creating a new process.
The Java Tutorials > Bonus > Generics > Wildcards
public void drawAll(List shapes) {
...
}
There is a small but very important difference here: we have replaced the type Listwith List. Now drawAll() will accept lists of any subclass of Shape, so we can now call it on a List if we want.
List is an example of a bounded wildcard. The ? stands for an unknown type, just like the wildcards we saw earlier. However, in this case, we know that this unknown type is in fact a subtype of Shape. (Note: It could be Shape itself, or some subclass; it need not literally extend Shape.) We say that Shape is the upper bound of the wildcard.
There is, as usual, a price to be paid for the flexibility of using wildcards. That price is that it is now illegal to write into shapes in the body of the method. For instance, this is not allowed:
public void addRectangle(List shapes) {
shapes.add(0, new Rectangle()); // Compile-time error!
}
You should be able to figure out why the code above is disallowed. The type of the second parameter to shapes.add() is ? extends Shape-- an unknown subtype of Shape. Since we don't know what type it is, we don't know if it is a supertype of Rectangle; it might or might not be such a supertype, so it isn't safe to pass a Rectangle there.
The Java Tutorials: Essential Classes > Regular Expressions > Quantifiers
I'll need to revisit this topic as I only have superficial comprehension of Java Formatters like NumberFormat.
Labels: api, internationalization, java, todo
http://java.sun.com/docs/books/tutorial/java/IandI/super.html
Invocation of a superclass constructor must be the first line in the subclass constructor.
The syntax for calling a superclass constructor is
super();
--or--
super(parameter list);
Labels: java
I've started rereading the book, and I definitely don't recommend it for preparing for the SCJP exam for J2SE 5.
After being a little demoralized last year (what, I can't learn the new features in 4 weekends?), it's time to take up the gauntlet again and count down till June when I absolutely have to take the Java Certified Programmer Exam for Java 5. My voucher expires then, as I mistakenly bought the voucher before I was ready to pass the exam.
Some Map Interface methods:
Some methods in the Collection Interface:
What is a servlet?
Servlets are modules of Java code that run in a server application (hence the name "Servlets", similar to "Applets" on the client side) to answer client requests. Servlets are not tied to a specific client-server protocol but they are most commonly used with HTTP and the word "Servlet" is often used in the meaning of "HTTP Servlet".
Labels: java
I'm trying to use a form that has a array of FormFile as a field of the form.
I just ran across an interesting article on Multibyte-character processing in J2EE. It looks like a good introduction to the issue.
The Eclipse Web Tools Project (for the Eclipse Integrated Development Environment) has useful tools for Web application development. I specifically installed it for the JSP editor and XML editor. There are a bunch of other tools included in it, of course. The simplest way to install the Web Tools Project is to follow these instructions in your existing Eclipse installation. I have Eclipse 3.1 installed and updating took a while but worked smoothly.