Understanding constructors

How constructors differ from methods Saying that a constructor is a method is like saying that the Australian platypus is just another mammal. To understand the platypus, it is important to know how it is different from other mammals. To…

Do you really need Enterprise JavaBeans?

Do you really need Enterprise JavaBeans?

EJB is not a one-size-fits-all solution The Java 2 Platform, Enterprise Edition (J2EE), and Enterprise JavaBeans (EJB) have now become household names for Java programmers. If you are new to Java or more specifically, server-side Java, Figure 1 will help…

Mapping XML to Java, Part 2

Create a class library that uses the SAX API to map XML documents to Java objects As I mentioned in Part 1, one of the big problems programmers face when using the SAX API is conceptual. I’d like to address…

The Gnutella file-sharing network and Java

Use the JTella API to easily develop applications that access Gnutella I’ll begin with some definitions. First, Internet file sharing is an activity performed by a community of connected users. The file-sharing system, at a minimum, allows users to share…

Everything is an object, Part 2

Build your first Java program There are several issues you must understand before seeing your first Java program. TEXTBOX: TEXTBOX_HEAD: Everything is an object: Read the whole series! Part 1. Learn to write your first Java program with these Java…

Make room for JavaSpaces, Part 6

Make room for JavaSpaces, Part 6

Build and use distributed data structures in your JavaSpaces programs The design of any space-based application typically revolves around one or more distributed data structures. These are data structures that exist in a space where multiple processes can access and…

In Java, size doesn’t matter

Can you ascertain the size of a primitive in Java? Q: Is there a method in Java for determining the size of a primitive type, similar to C++’s sizeof operator? A: The short answer: you can’t find the size of…

Java Tip 103: Send HTTP requests for serialized objects

Java Tip 103: Send HTTP requests for serialized objects

Implement Web object tunneling to transport Java objects through firewalls My Web Object Tunneling utility evolved when I needed to develop an applet that would display dynamic server-side data stored as JavaBeans. I needed to consider how to detect their…