- Java is simple. That simplicity derives from syntax similar to C/C++ and the omission of complex C/C++ features such as multiple implementation inheritance, pointers, and operator overloading.
- Java is object-oriented. Java’s object-oriented nature encourages a developer to think in terms of classes and objects rather than separate code and data. That class/object focus results in code that is easier to write, easier to maintain, and easier to reuse.
- Java is network-savvy. A TCP/IP library simplifies the development of programs that communicate with HTTP, FTP, and other TCP/IP network processes. Furthermore, the library’s use of the same stream-oriented mechanism for communicating with remote network processes that file-oriented code uses to communicate with files on a computer’s local hard drive helps a developer write network code faster.
- Java is interpreted. Java’s compiler translates source code into class files of bytecode instructions. A virtual machine examines each instruction and uses that instruction’s meaning to execute an equivalent sequence of platform-dependent instructions. Interpretation speeds up the development process and simplifies debugging.
- Java is robust. Errant programs do not crash the virtual machine or corrupt the underlying (native) platform. Robustness is achieved, in part, by not supporting C/C++ pointers, by providing a garbage collector to automatically free up dynamically allocated memory (instead of forcing the developer to accomplish that task), by performing strict compile-time/runtime type checking, and by providing true arrays with bounds checking.
- Java is secure. Java’s "sandbox" security model identifies sensitive operations (such as file I/O) that a malicious program can exploit to harm the native platform, and provides a mechanism for allowing or preventing access to those operations.
- Java is architecture-neutral. A compiled Java program’s bytecode instructions target a generic virtual machine instead of a specific platform. Because each platform-specific virtual machine implementation supplies a consistent interface to the bytecodes, the same Java program runs on diverse platforms (via their virtual machines).
- Java is portable. Portability is achieved through architecture neutrality and through a strict definition of the language (which permits no implementation-dependent features). For example, Java’s integer primitive type always means a signed 2’s complement 32-bit integer. In contrast, the C/C++ integer type can be unsigned, and its size varies according to a platform’s register size (typically 32 bits or 64 bits).
- Java is high-performance. Many virtual machines use a just-in-time (JIT) compiler to dynamically compile a program’s bytecode instructions into platform-specific instructions (which execute faster than bytecodes) as the program runs.
- Java is multithreaded. Support for threads is built into the language via thread-synchronization primitives. There is also a thread library.
- Java is dynamic. Java’s use of an interface type to distinguish between what a program must do and how that task gets accomplished helps Java adapt to a continually evolving environment, and makes it easier for vendors to modify Java libraries without breaking program code that uses those libraries.
Java Reference Guide
Interface Design Best Practices in Object-Oriented API Design in Java
Before getting started, I'd like to clarify a few terms.
Designer vs. client programmers
Most Java programmers have two hats on their shelf, which they wear at different times. Sometimes they wear their "designer" hats and build libraries of classes for others to use; other times they wear their "client" hats and make use of a library of classes created by someone else. Some Java programmers even where both hats at the same time, completely oblivious to the rules of fashion.
One aspect of the flexibility of a body of code is the ease with which a client programmer can understand the code. Whether a client programmer is planning to change code or just use it as is, that programmer often has to figure out how to change or use the code by reading it.
The guidelines discussed in this book will talk about flexibility in terms of client programmers. Designs and implementations that are flexible are those that are easy for client programmers to understand, use, and change.
Read More/Get EbookAdvanced Programming for the Java 2 Platform
To help you navigate the Java APIs and fast-track your project development time, this book includes the design, development, test, and deployment phases for an enterprise-worthy auction application. While the example application does not cover every possible programming scenario, it explores many common situations and the discussions leave you with a solid methodology for designing and building your own solutions.
This book is for developers with more than a beginning level of understanding of writing programs in the Java programming language. The example application is written with the Java® 2 platform APIs and explained in terms of functional hows and whys, so if you need help installing the Java platform, setting up your environment, or getting your first application to work, you should first read a more introductory book such as Essentials of the Java Programming Language: A Hands-On Guide or The Java Tutorial.
Concurrent Programming Using Java
This is an introduction to using the Java programming language in concurrent or multithreaded applications. The context is the process synchronization material and related concurrent programming in operating systems courses as opposed to software engineering. Topics covered are race conditions when threads share data, critical sections, mutual exclusion, semaphores, monitors, message passing, the rendezvous, remote procedure calls, distributed or network programming, and parallel processing. Solutions to the classical problems talked about in operating systems courses (the dining philosophers, the bounded buffer producers and consumers, and the database readers and writers) are shown in Java. Also shown is how to animate algorithms using the command set of the Xtango animation interpreter, animator. Some of the animation examples can be viewed as applets.
These example programs were developed and tested using Sun Microsystem's JDK version 1.0.2 and 1.1 for Solaris 2.x and Windows 95/NT (1996--97). They have been updated to remove all ``deprecated'' methods and constructors. The multimachine socket examples use the readObject() and writeObject() methods of the ObjectInputStream and ObjectOutPutStream classes, which are part of the RMI (remote method invocation) add-on for JDK 1.0.2 and included with JDK 1.1.
All of the code examples described and hyperlinked here may be retrieved as a gzip tar archive or zip archive.
Java is designed to be a platform-independent language, so all of these examples, including the animated ones, will run without change on Sun's Solaris 2.x UNIX for Sparc and Microsoft Windows 95/NT for Intel-based PCs.
Securing Java
Java has grown by leaps and bounds since its introduction in 1996, and is now among the most popular computing platforms on the planet. Java has evolved and changed so much that at a mere two-years old, our original work, Java Security: Hostile Applets, Holes, and Antidotes, found itself in serious need of revision and expansion. This book is the result of several years of thinking about mobile code and security, and includes many things we have discovered while working on real-world systems with businesses and government agencies. Our goal is to present enough information to help you separate fact from fiction when it comes to mobile code security.
Java has become much more complicated and multifaceted than it was when it was introduced. No longer simply a client-side language for applets, Java can now be found on everything from enterprise application servers to embedded devices like smart cards. We have tried to address security factors from throughout the entire Java range in this book.
We hope this book appeals to geeks and grandmothers alike (not that some grandmothers aren't geeks). Although it gets technical in places, we hope the messages are clear enough that even the casual Web user comes away with a broader understanding of the security issues surrounding mobile code. We kept four groups in mind as we wrote this book: Web users, developers, system administrators, and business decision-makers. Many of the issues of mobile code security cut across these groups. As Java integrates itself into the foundations of electronic commerce, Java security issues take on more urgency.
Java is only one kind of mobile code among many. Other systems immersed in the same security dilemma include ActiveX, JavaScript, and Word Macros. It is essential not to get the wrong message from this book. Our focus on Java is no accident. We believe Java is the most viable mobile code system created to date. Don't believe that through our work we imply that other systems are any more secure than Java. Just the opposite is true.
With the introduction of code signing to Java (in JDK 1.1) and its enhancement with access control (in Java 2), securing Java became much harder. Java's position along the security/functionality tradeoff has moved significantly toward functionality, to the detriment of security. This is good if you want more functionality, which most businesses and developers seem to need, but it is bad if you are charged with managing security risks. Forming an intelligent Java use policy is more important than ever, but doing so is more complicated than it used to be.
Processing XML with Java
This book is written for experienced Java programmers who want to integrate XML into their systems. Java is the ideal language for processing XML documents. Its strong Unicode support in particular made it the preferred language for many early implementers. Consequently, more XML tools have been written in Java than in any other language. More open source XML tools are written in Java than in any other language. More programmers process XML in Java than in any other language.
Processing XML with Java will teach you how to:
Save XML documents from applications written in Java
Read XML documents produced by other programs
Search, query, and update XML documents
Convert legacy flat data into hierarchical XML
Communicate with network servers that send and receive XML data
Validate documents against DTDs, schemas, and business rules
Combine functional XSLT transforms with traditional imperative Java code
This book is meant for Java programmers who need to do anything with XML. It teaches the fundamentals and advanced topics, leaving nothing out. It is a comprehensive course in processing XML with Java that takes developers from little knowledge of XML to designing sophisticated XML applications and parsing complicated documents. The examples cover a wide range of possible uses including file formats, data exchange, document transformation, database integration, and more.
Apache Jakarta Commons
Exploring the Jakarta Commons, I first found a broad suite of what I would characterize as "utility" code—things that often wound up in my software in packages named things like "util." Digging deeper, I found useful libraries to solve common problems, interesting algorithms, and more. In brief, by using the Jakarta Commons, I found I spent less time reinventing the wheel, and more time solving the problem at hand.
Virtually every Java developer can take advantage of various Jakarta Commons components—from the utilities provided by the Collections andLang packages, through the networking components afforded by the HttpClient and Net packages. These components underlie Apache Tomcat, Struts, and countless other projects, helping move forward both the Java industry and the Java platform.
The first few chapters cover the more web-specific packages, including FileUpload, HttpClient, and the Net suite of protocol implementations. The Pool and DBCP packages are useful for a broader range of applications. BeanUtils and JXPath provide easier ways to work with objects. Logging, Lang, and Collections are a suite of tools applicable to almost every application. Codec provides a suite of specialized conversion routines, useful for data transfer, security, and (interestingly) phonetic analysis. Finally, the CLI package provides support for building command-line applications.
Read More/Get Ebook
Java Application Development on Linux
No doubt, there are a host of Java books on the market. We didn’t wake up one morning and say, “You know what the world really needs? Another book about Java!” No. What we realized was that there are a couple of “holes” in the Java book market.
First, Linux as a development platform and deployment platform for Java applications has been largely ignored. This is despite the fact that the *nix platform (meaning all UNIX and UNIX-like systems, Linux included) has long been recognized as one of the most programmer-friendly platforms in existence. Those few resources for Java on Linux that exist emphasize tools to the exclusion of the Java language and APIs.
Second, books on the Java language and APIs have focused on pedagogical examples that serve to illustrate the details of the language and its libraries, but very few of these examples are in themselves practically useful, and they tend to deal only with the issues of writing programs, and not at all with deploying and maintaining them. Anyone who has worked on a major software project, especially a software project that is developed and deployed in a business for a business, knows that designing and coding are only about half of the work involved. Yes, writing Java code is only slightly affected by the development and the deployment platform, but the process of releasing and maintaining such applications is significantly different between platforms....
Read More/Get Ebook
Sun Certified Java Programmer Pre-Exam Essentials
This version is written according to the objectives of the "Sun Certified Programmer For Java™ 2 Platform 1.4" exam. For those taking the 1.2 exam, the objectives no longer required for 1.4 have been retained towards the end of this document. The sections have "1.2 Exam Only" at the start of their titles. I would recommend doing the 1.4 exam instead, as it is more current and the only major new subject is assertions.
Aside: There is no 1.3 exam, as such. The 1.1 exam exam was replaced by a Java2 exam, which at the time seemed like it would suffice for all Java2 releases. However in September 2002 Sun released seperate 1.2 and 1.4 exams. The 1.2 syllabus is for 1.2 and 1.3.
Read More/Get EbookPopular Posts
-
By David J. Eck I ntroduction to Programming Using Java is a free introductory computer programming textbook that uses Java as the language...
-
By Robert Sedgewick and Kevin Wayne This booksite supplements the forthcoming textbook Introduction to Computer Science in Java by Robert Se...
-
This post helps you to study java programming. Following free java ebooks focus on java tutorial, java swing, sun java interface, java strut...
-
By Mikalai Zaikin The purpose of this document is to help in preparation for exam CX-310-220 (Sun Certified Developer for Java Web Services)...
-
By Mikalai Zaikin The purpose of this document is to help in preparation for exam 310-052 (Sun Certified Enterprise Architect for Java EE 5)...
-
By David Schmidt, Kansas State University This free ebook entitiled "Programming Principles in Java: Architectures and Interfaces"...
-
By Patrick Niemeyer & Joshua Peck This ebook is about the Java language and programming environment. If you've been at all active on...
-
"Bleeding at the Keyboard" is a very nice java ebook and a good java guide teaches you modern programming with java. This java ebo...
-
By Mark Grand This book is a reference manual for the Java programming language; it covers Version 1.1 of the Java language. It provides a c...
-
By John Zukowski The Abstract Window Tookit (AWT) provides the user interface for Java programs. Unless you want to construct your own GUI o...