Traps in Java

Jien Tsai Chan*, Wuu Yang, Jing Wei Huang

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

1 Scopus citations


Though the Java programming language was designed with extreme care, there are still a few ambiguities and irregularities left in the language. The ambiguities are those issues that are not defined clearly in the Java language specification. The different results produced by different compilers on several example programs justify our observations. The irregularities are issues that often confuse programmers. It is hard for a confused programmer to write robust programs. Furthermore, a few issues of the Java language are left intentionally open to the compiler writers. Their effects on Java programs are discussed. The problems of ambiguity, irregularity, and dependence on implementations frequently trap an incautious Java programmer. Some suggestions and solutions for the problems are provided in this paper.

Original languageEnglish
Pages (from-to)33-47
Number of pages15
JournalJournal of Systems and Software
Issue number1
StatePublished - 1 Jun 2004


  • Java
  • Language definition
  • Language design
  • Object-oriented programming

Fingerprint Dive into the research topics of 'Traps in Java'. Together they form a unique fingerprint.

Cite this