Articles on Basic Java


Non-object-oriented language basics.

Mastering the classpath with JWhich

Log4j delivers control over logging

Optimize a query on a Map

Do static member classes possess any particular access advantages?

Polymorphism in its purest form

Behold the power of parametric polymorphism

Polymorphism and Java

Calculating Java dates - Take the time to learn how to create and use dates

Java constants - Create constants that have the benefits of using the C preprocessor's facilities

Whether you are dealing with financial transactions or planning future activities, you need to know how to create, use, and display dates in a Java program

Discovering Trigonometry

Calculating holidays and their observances - Figure out all of those cool days off that you get for holidays

Can you create a matrix of primitive types that default to all zeros? - Yes, you can, and here's how

Automate the hourglass cursor- Force Java's UI event queue to decide when to show the hourglass cursor

Designing with interfaces

Design with dynamic extension

In this installment of Java Q&A column, our Java experts tackle the insand outs of invoking outside class files from a running Java app.

Smarter Java development - Use interfaces to effectively enforce development contracts while maintaining loose coupling of code

Static inner classes for fun and profit

Inheritance versus composition: Which one should you choose? -A comparative look at two fundamental ways to relate classes

Inner classes - So what are inner classes good for anyway?

The truth about private

DESIGN FOR PERFORMANCE: REDUCE OBJECT CREATION

SWEEP OUT BADE CODE - John Farrell suggests practical steps for revising, refactoring, and rebuilding bad code. By following the steps he outlines in this article, you can save projects and become a well-paid, respected team player with a corner office, without losing your sanity or working late

TCL YOUR JAVA APPS - Benedict Chng shows you how to embed Tcl scripting in your Java application to reduce your time-to-market and make your code remarkably simple to change and maintain. If properly carried out, anyone should be able to change code without paging you for help

JAVA DIAMONDS ARE FOREVER - How does Java solve the multiple inheritance diamond problem? Find out from Tony Sintes in this week's Java Q&A

Java API Map

IT'S JAVA TIME - In "Working in Java time," Robert Nielsen explains the basics of calculating elapsed time in Java.

THE CONSTANTS QUESTION - What's the best way to handle constants in an application? It's a good question, and Java Q&A expert Tony Sintes has the answer.

MAKING DEEP COPIES OF OBJECTS - The March 6, 2001 JDC Tech Tip "Cloning Objects"

IS THE LACK OF JAVA CLASS RELOADING A PROBLEM?

IMPORT OVERHEAD

IT'S ALL ABOUT JAVA BYTE CODE

DOES THE FUTURE HAVE TO BE JAVA?

Use constant types for safer and cleaner code - Avoid making typos while encapsulating arbitrary data in legacy systems in an elegant object-oriented way

Thanks type and gentle class - Type and class are not interchangeable terms, but two carefully distinguishable object-oriented concepts

iContract: Design by Contract in Java - iContract allows you to explicitly specify your class contracts; no more guesswork as to what your classes promise

Make bad code good - Refactor broken Java code for fun and profit

WHEN TO CHOOSE AN ABSTRACT CLASS OVER AN INTERFACE?

Events and listeners - How do you create a custom event?

Understanding the Java ClassLoader

ACCESS MODIFIERS: WHAT GIVES?

How many times do you restart your server during development? - Is the lack of Java class reloading a problem?

The basics of Java class loaders - The fundamentals of this key component of the Java architecture

Understanding constructors - How constructors differ from methods

Constructor help - How does the compiler handle constructors?

How exceptions work - This detailed tutorial on exceptions in Java explains their purpose, how to cause and handle exceptions, and more

Java diamonds are forever - How does Java solve the multiple-inheritance diamond problem?

WRITE JAVA PROGRAMS TO CALCULATE AND FORMAT CURRENCY -Java programs must often calculate and format financial figures. To write Java programs that deal with finances, you must know about the BigDecimal class and numeric formatting. This introductory tutorial shows you how to use BigDecimal to calculate basic financial transactions.

The Math Object

The Math Object -Helpful methods for calculations

CAN YOU COMPILE JAVA CODE INTO A NATIVE EXECUTABLE? - In this week's Java Q&A, Tony Sintes answers two questions: "How can I compile my Java code into a native executable?" and "I know about Visual Age and TowerJ, but doesn't the JDK ship with a native compiler?" Find out the answers

IMPROVE TOKENIZATION OF INFORMATION-RICH STRINGS - In Java Tip 112, Bhabani Padhi shows you how to exploit StringTokenizer to build a powerful tokenizer. Learn how to perform better tokenization of complicated and information-rich strings